-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
There are a few file formats that would benefit from the ability to pass parameters through the Image.open() method. This needs to be thought about carefully because there are clearly some parameters that are generic (e.g. mode, size and dpi arguments, which could cause conversion or resizing, all of which can in some instances be supported directly by the image file plugin), while others are very format specific (e.g. the number of quality layers to load in a JPEG 2000 image).
As of today, some image file plugins are essentially relying on the laziness of PIL’s loading machinery so that the user can call open and subsequently set some properties on the returned object before load gets called. This is, IMO, pretty nasty.
(I might be up for fixing this myself, but I want to file a bug report before doing any coding because I want the opinions of others on how this should work.)