Andrew Murray
Andrew Murray
While Pillow might read the data from the image and say the result is "I" mode, that doesn't mean that there is actually 32 bits of data in the image...
If you would like Pillow to throw an error when trying to save an I mode image as a PNG, because the full range of values cannot be saved, then...
> Yes, this sounds reasonable. If PIL can't save the image without a data loss, it should raise an error instead. I've created #9023 to deprecate the behaviour. > Looking...
Yes. Once the deprecation period has ended, ```python import numpy import PIL.Image as PilImage shape = (1024, 1024) data = numpy.full(shape=shape, fill_value=-5, dtype=numpy.int16) pil_image = PilImage.fromarray(data) pil_image.save("foo.png") ``` will raise...
Would you like to create a pull request for this?
Just to note - this code was originally added in #77 Would you be able to add a test that passes with your change, but fails without it? > a...
The test you added was to > verify that specifying standard qtables and a quality is equivalent to specifying only a quality You tested it with a value of 75....
> but don't match if I don't specify quality at all Sorry, still wondering about this. If I [save with qtables and no quality, and compare that against no qtables...
@gofr as the author of the related #4989, I wonder if you had any thoughts on this?
Thanks. We recently had #9024 report a test failure when using libjpeg, rather than libjpeg-turbo. Considering that, I've tested this branch with libjpeg, and the assertion does fail - https://github.com/radarhere/Pillow/actions/runs/15942707545/job/44972935266...