Andrew Murray

Results 764 comments of Andrew Murray

Apart from skipping some checks with PNGs, the other behaviour of `LOAD_TRUNCATED_IMAGES` is to try and load images that end prematurely. The internal Pillow data will not be in a...

You're requesting that we only raise a warning in this situation? If the image is corrupted or ends prematurely, I think we both agree that users should know there is...

That's not as easy as it sounds. By default, Pillow [checks your image](https://github.com/python-pillow/Pillow/blob/eee633cb217b201cf143d0b813e31c6ae9b08284/src/PIL/Image.py#L3322-L3340) against multiple formats. Some formats can be easily rejected because your image data does not start with...

I've created https://github.com/python-pillow/Pillow/pull/8033 to allow `Image.open("bug.png", warn_possible_formats=True)` to show the various exceptions as warnings, but only if the image is not able to be opened successfully. See what you think.

I feel the concern about scalability, but as for a logger, as @nulano [pointed out](https://github.com/python-pillow/Pillow/pull/8033#discussion_r1584243182), this is something that previously existed, but was removed in #1423. https://github.com/python-pillow/Pillow/blob/ddbf08fa78a1aeac83c8295b071f15c722615326/src/PIL/Image.py#L3343-L3347 I am cautious...

I've created #8063 with `Image.WARN_POSSIBLE_FORMATS`

There's a slightly awkward overlap in code that would change with this and with #7965.

That branch has now become #8158

Are you aware of any small images (under 500kb) images that could be added to our test suite and distributed under the Pillow license?

While the test suite now passes, if you actually run ```python with Image.open("Tests/images/p_16.tga") as im: im.save("out.png") ``` you get a transparent image. Looking at 'Color Map Specification' in https://www.dca.fee.unicamp.br/~martino/disciplinas/ea978/tgaffs.pdf, it...