Skip to content
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

Large jpg error #14

Open
XaviAure opened this issue Jun 8, 2021 · 2 comments
Open

Large jpg error #14

XaviAure opened this issue Jun 8, 2021 · 2 comments

Comments

@XaviAure
Copy link

XaviAure commented Jun 8, 2021

Hi Glen
I have been trying to use the tiler for large jpg images (65000 x 40335) but it keeps giving me errors. The largest size I managed to run was 30000 px. Is there a maximum size the tiler can run? Thanks for your help.

Zoom level 5
Exception in thread "main" java.lang.IllegalArgumentException: width*height > Integer.MAX_VALUE!
at javax.imageio.ImageReader.getDestination(Unknown Source)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(Unknown Source)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(Unknown Source)
at javax.imageio.ImageIO.read(Unknown Source)
at javax.imageio.ImageIO.read(Unknown Source)
at uk.co.gdmrdigital.iiif.image.IIIFImage.loadImage(IIIFImage.java:23)
at uk.co.gdmrdigital.iiif.image.IIIFImage.(IIIFImage.java:18)
at uk.co.gdmrdigital.iiif.image.Tiler.createImages(Tiler.java:177)
at uk.co.gdmrdigital.iiif.image.Tiler.main(Tiler.java:234)

@glenrobson
Copy link
Owner

I'll have to investigate a different way of loading images but looking at that exception. The Integer.MAX_VALUE is 2,147,483,647 and the width x height you mention is (65000 x 40335) 2,621,775,000 which is bigger than the max value... Assuming iiif-tiler is given enough RAM it should process images with dimensions that multiple together are under the MAX_VALUE but this seems an artificial limit so Ill see if there is a way to get round it.

There is also another issue with the iiif-tiler for images which are bigger than 65k x 65k pixels as this is bigger than is allowed in the jpg standard but I don't think you've hit that issue yet.

@XaviAure
Copy link
Author

XaviAure commented Jun 9, 2021

Thanks for looking into it. I know about the 65k limit, the images were already resized to fall below that limit, that is why I thought there was some other error going on.
Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants