Can I increase pixel limit for an input file? #1282
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
The limit is coming from lovell/sharp#2373, and is meant to avoid crashing. A limit of 268,402,689 pixels is equivalent to a 16K x 16K image, which costs about 1.5 GB in memory in a 3D viewer, and will certainly be too much for many 3D viewers. Adding I'm not certain how far Sharp can scale for image processing beyond the limit... if using smaller images under 16K x 16K is at all an option for you, I'd recommend that. You may also need to run Node.js with a higher memory limit than the CLI has access to by default, so just adding a new CLI flag to remove the limit might not be enough. I'm open to other ideas if you'd like to do some further investigation and testing here. |
Beta Was this translation helpful? Give feedback.
-
The option is now available experimentally on the v4 alpha release: npm install --global @gltf-transform/cli@next
gltf-transform webp in.glb out.glb --no-limit-input-pixels |
Beta Was this translation helpful? Give feedback.
The option is now available experimentally on the v4 alpha release: