sorl-thumbnail icon indicating copy to clipboard operation
sorl-thumbnail copied to clipboard

ImageFile.MAXBLOCK is still too low

Open pgcd opened this issue 6 years ago • 0 comments

While the issue might be addressed for most cases, there seems to be a related problem: the line https://github.com/jazzband/sorl-thumbnail/blob/de3a621c2f7620db5008c0b1cd3ad34cf68079fb/sorl/thumbnail/engines/pil_engine.py#L243 adds the ICC Profile to the image - which means that the encoder error may popup yet again for very large ICC profiles (I am looking at a 63K RGB Lab profile on a 120x80 thumbnail), which results in an "Encoder Error -2".

I'm not sure what the best solution would be (strip the ICC profile as well, or add it to the MAXBLOCX), so I'm not submitting a PR yet.

pgcd avatar Nov 24 '17 11:11 pgcd