-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resize width is limited to 16383 #176
Comments
Hi Stéphane, the <=16383 limit is due to the lowest common denominator of WebP storing each dimension in 14 bits. To increase this we'd need to switch from a generic hard limit applied to all formats to instead use per-format limits, e.g. JPEG uses 16 bits, so <= 65535. At the moment the output format isn't worked out until near the end of the processing pipeline, so this logic should probably move nearer to the start and then have per-format limits applied. |
@lovell thanks for your explanations. You might help and tell me what strategy is the best between in a memory point of view:
|
Support for Deep Zoom tile output is imminent (I'll be merging #146 today). Might this help? |
Sorry, the discussion on that PR quickly became quite detailed. The API it adds will (hopefully) be simple.
If you need to generate map tiles, once the new code is merged you should be able to do something as simple as |
Experimental support for tiled output is now available on the judgement branch: npm install lovell/sharp#judgement You'll need to ensure libvips was compiled with support for Deep Zoom (vips installed via homebrew does this already; for Linux install libgsf-1-dev first). |
@stephanebachelier Do you still require an increase to the minimum width or were you able to use the Deep Zoom |
@lovell no the deep zoom tile did not work for me. But I tested it 3 months ago. |
Given all the possible combinations of resizing, extraction, rotation etc. operations the final output image dimensions won't be known until the end of the pipeline. What I propose is to have a per-format check just before writing to the output image, with those limits being:
|
v0.18.0 now available. |
I need to resize an image to 16384*16384 with is 2^14 but sharp maximum width is set to 0x3FFF = 16383.
Have you an idea why this limit and if I can override it.
The text was updated successfully, but these errors were encountered: