

Image moduleImageChops (“channel operations”) moduleImageCms moduleImageColor moduleImageDraw moduleImageEnhance moduleImageFile moduleImageFilter moduleImageFont moduleImageGrab moduleImageMath moduleImageMorph moduleImageOps moduleImagePalette moduleImagePath moduleImageQt moduleImageSequence moduleImageShow moduleImageStat moduleImageText moduleImageTk moduleImageTransform moduleImageWin module (Windows-only)ExifTags moduleTiffTags moduleJpegPresets modulePSDraw modulePixelAccess classfeatures moduleDanger
ImageMath.eval() uses Python’seval() function to process the expressionstring, and carries the security risks of doing so. A direct replacement for this isthe newunsafe_eval(), but that carries the same risks. It isnot recommended to process expressions without considering this.lambda_eval() is a more secure alternative.
_imagingcms.c¶In_imagingcms.c, twostrcpy calls were able to copy too much data into fixedlength strings. This has been fixed by usingstrncpy instead.
A number of constants and a function inImageCms have been deprecated.This includes a table of flags based on LittleCMS version 1 which has been replacedwith a new classImageCms.Flags based on LittleCMS 2 flags.
Deprecated | Use instead |
|---|---|
| No replacement |
|
|
| |
| |
| No replacement |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
ImageMath.eval() has been deprecated. Uselambda_eval() orunsafe_eval() instead. See earlier security notes for moreinformation.
When saving WebP images, analpha_quality argument can be passed to the encoder. Itis an integer value between 0 to 100, where values other than 100 will provide lossycompression.
When callingquantize(), a negativekmeans will nowraise aValueError, unless a palette is supplied to make the value redundant.
If a P1-P3 PPM image contains a negative value, aValueError will now beraised.
PerspectiveTransform has been added, meaningthat all of theTransform values now have a correspondingsubclass ofTransform.
Support has been added for reading and writing grayscale (Pf format)Portable FloatMap (PFM) files containingF data.
Python’s Global Interpreter Lock is now released when fetching WebP frames fromthe libwebp decoder.
Pillow now has type hints for a large part of its modules, and the packageincludes apy.typed file and theTyping::Typed Trove classifier.