Andrew Murray
Andrew Murray
Was my code helpful at all? Or are you really just holding out for a builtin Pillow API for this functionality?
> Since it's allocating the core image object and the python object, I don't really see the point. I don't think it's allocating the Python level image. https://github.com/python-pillow/Pillow/blob/07fee96880039ad283c4e8154fe4d8786e00adcd/src/PIL/ImageOps.py#L713
Hi. Good work on finding this. Just to show the code you're talking about, you're absolutely right, I had expected that https://github.com/python-pillow/Pillow/blob/ec40c546d7d38efebcb228745291bd3ba6233196/src/PIL/ImagePalette.py#L116-L120 would naturally mean that this assertion was valid....
I've updated one of our existing tests in my PR. See what you think.
Hi. I don't think this does actually resolve #6478, as I think that issue wants to compare all frames of an image, and to have images automatically convert before comparison....
Closing, as this doesn't resolve the issue. The suggestion here isn't wholly uninteresting by itself, but there's been no response, and I think there should be at least one advocate...
Could you post a copy of IMG_5615.jpeg here?
The DEBUG messages are coming from https://github.com/python-pillow/Pillow/blob/331e4e751733eb0af018602ef26746a7e0571107/src/PIL/TiffImagePlugin.py#L904-L941 I don't think of them as a problem - let us know if you're interested in not showing those.
Pillow has identified the image as an MPO. So I think if you adjust your code to `valid_mime_types = ["jpeg", "mpo", "png", "webp"]`, you will find that the ERROR goes...
The following works for me. ```python from PIL import Image im = Image.open('in.webp') im.save('out.webp') ``` Does it work on your machine? If yes, then something in ```python thumb.save(new_content, format=img_format, quality=self.field.quality,...