Repository navigation
Conversation
|
I can see that six tests fail (in my local environment) if they aren't, but I don't understand why setting |
|
It is because an ImagingCore instance with one dimension of zero is falsy. >>> from PIL import Image
>>> "truthy" if Image.new("L", (0, 1)).im else "falsy"
'falsy'
>>> "truthy" if Image.new("L", (1, 0)).im else "falsy"
'falsy'
>>> "truthy" if Image.new("L", (1, 1)).im else "falsy"
'truthy'This is producing results that you don't expect when running against If you dislike this, then you can either change the |
e311a46 to
919dbbe
Compare
Suggestion for python-pillow#7271, to fix the failing tests.
I've removed the setters for
modeandsize, restored some of the lines you removed, removed a duplicate@propertyand updated a BMP test and GifImagePlugin.You have considered that the image might not be loaded yet, meaning that there is no
self.im. I think you also need to consider seeking to another frame, but before, at which time that there will be aself.imbut the size of the image should be the size of the tile that isn't loaded yet. As a result, I've also added a@propertyin ImageFile forsize. I've also added one formode.With these changes, all tests now pass.