Closed fred4ets closed 2 years ago
This looks like it is not an Kiva/Agg-specific thing, but a PIL/Pillow global setting. So you should be able to instead do something like:
from PIL import Image
Image.MAX_IMAGE_PIXELS = None
at the top of your script or in your app's main - basically this can go anywhere in your code before you try to load the image.
Stupid me.
Thanks a lot.
Hello all,
I would like to display pics from JWST.
But files are quite big (180 MB for Stephan Quintet for instance), so when I use Plot's img_plot(), I get the following error message:
So I glanced at Google, and I got the following workaround:
Set PIL's
MAX_IMAGE_PIXELS
toNone
OK.
PIL is called in
kiva/agg/agg.py
line 1468:from PIL import Image as PilImage
So when I add line:
PilImage.MAX_IMAGE_PIXELS = None
it works fine, there is no more error message.
So my question is: how can I use this trick without modifying Agg source file?
Thanks in advance.
Regards