Allow passing arguments to PIL.Image.save().#13094
Conversation
|
👍 in principle, but needs a test. |
|
Test added. (Explicitly not testing compression for tiff as that requires pillow+libtiff and I'd rather write something independent of whether libtiff is installed.) |
|
Looks good, but I see a test using pil_kwargs only for TIFF, not for Jpeg. Can the latter be added easily? |
|
@efiring That's because Pillow can be built with or without libjpeg support, and I don't want to bother checking what build variant we have (I'm not even sure what to check or what exception to catch -- if you know, please let me know); on the other hand, Pillow always does have tiff support (as that's pure python). |
PR Summary
Closes #8530; more general than #8531 (this way we don't need to implement each and every kwarg separately).
Unfortunately, does not help with #5397 as png output does not go though pillow.
PR Checklist