Pillow

Latest version: v11.1.0

Safety actively analyzes 721825 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 23 of 24

0.3b2

-----

The test suite includes 825 individual tests.

- An Image "getbands" method has been added. It returns a tuple
containing the individual band names for this image. To figure
out how many bands an image has, use "len(im.getbands())".

- An Image "putpixel" method has been added.

- The Image "point" method can now be used to convert "L" images
to any other format, via a lookup table. That table should
contain 256 values for each band in the output image.

- Some file drivers (including FLI/FLC, GIF, and IM) accidentally
overwrote the offset method with an internal attribute. All
drivers have been updated to use private attributes where
possible.

- The Image "histogram" method now works for "I" and "F" images.
For these modes, PIL divides the range between the min and
max values used in the image into 256 bins. You can also
pass in your own min and max values via the "extrema" option::

h = im.histogram(extrema=(0, 255))

- An Image "getextrema" method has been added. It returns the
min and max values used in the image. In this release, this
works for single band images only.

- Changed the PNG driver to load and save mode "I" images as
16-bit images. When saving, values outside the range 0..65535
are clipped.

- Fixed ImageFont.py to work with the new "pilfont" compiler.

- Added JPEG "save" and "draft" support for mode "YCbCr" images.
Note that if you save an "YCbCr" image as a JPEG file and read
it back, it is read as an RGB file. To get around this, you
can use the "draft" method::

im = Image.open("color.jpg")
im.draft("YCbCr", im.size)

- Read "RGBA" TGA images. Also fixed the orientation bug; all
images should now come out the right way.

- Changed mode name (and internal representation) from "YCrCb"
to "YCbCr" (!)
**WARNING: MAY BREAK EXISTING CODE**

0.3b1

-----

The test suite includes 750 individual tests.

- The "pilfont" package is now included in the standard PIL
distribution. The pilfont utility can be used to convert
X BDF and PCF raster font files to a format understood by
the ImageFont module.

- GIF files are now interlaced by default. To write a
non-interlaced file, pass interlace=0 to the "save"
method.

- The default string format has changed for the "fromstring"
and "tostring" methods.
**WARNING: MAY BREAK EXISTING CODE**

NOTE: If no extra arguments are given, the first line in
the string buffer is the top line of the image, instead of
the bottom line. For RGB images, the string now contains
3 bytes per pixel instead of 4. These changes were made
to make the methods compatible with the "fromstring"
factory function.

To get the old behaviour, use the following syntax::

data = im.tostring("raw", "RGBX", 0, -1)
im.fromstring(data, "raw", "RGBX", 0, -1)

- "new" no longer gives a MemoryError if the width or height
is zero (this only happened on platforms where malloc(0)
or calloc(0) returns NULL).

- "new" now adds a default palette object to "P" images.

- You can now convert directly between all modes supported by
PIL. When converting colour images to "P", PIL defaults to
a "web" palette and dithering. When converting grayscale
images to "1", PIL uses a thresholding and dithering.

- Added a "dither" option to "convert". By default, "convert"
uses floyd-steinberg error diffusion for "P" and "1" targets,
so this option is only used to *disable* dithering. Allowed
values are NONE (no dithering) or FLOYDSTEINBERG (default).
::

imOut = im.convert("P", dither=Image.NONE)

- Added a full set of "I" decoders. You can use "fromstring"
(and file decoders) to read any standard integer type as an
"I" image.

- Added some support for "YCbCr" images (creation, conversion
from/to "L" and "RGB", IM YCC load/save)

- "getpixel" now works properly with fractional coordinates.

- ImageDraw "setink" now works with "I", "F", "RGB", "RGBA",
"RGBX", "CMYK", and "YCbCr" images.

- ImImagePlugin no longer attaches palettes to "RGB" images.

- Various minor fixes.

0.3a4

-----

- Added experimental IPTC/NAA support.

- Eliminated AttributeError exceptions after "crop" (from
Skip Montanaro)

- Reads some uncompressed formats via memory mapping (this
is currently supported on Win32 only)

- Fixed some last minute glitches in the last alpha release
(Types instead of types in Image.py, version numbers, etc.)

- Eliminated some more bogus compiler warnings.

- Various fixes to make PIL compile and run smoother on Macs
(from Jack Jansen).

- Fixed "fromstring" and "tostring" for mode "I" images.

0.3a3

-----

The test suite includes 530 individual tests.

- Eliminated unexpected side-effect in "paste" with matte. "paste"
now works properly also if compiled with "gcc".

- Adapted to Python 1.5 (build issues only)

- Fixed the ImageDraw "point" method to draw also the last
point (!).

- Added "I" and "RGBX" support to Image.new.

- The plugin path is now properly prepended to the module search
path when a plugin module is imported.

- Added "draw" method to the ImageWin.Dib class. This is used by
Topaz to print images on Windows printers.

- "convert" now supports conversions from "P" to "1" and "F".

- "paste" can now take a colour instead of an image as the first argument.
The colour must match the colour argument given to the new function, and
match the mode of the target image.

- Fixed "paste" to allow a mask also for mode "F" images.

- The BMP driver now saves mode "1" images. When loading images, the mode
is set to "L" for 8-bit files with grayscale palettes, and to "P" for
other 8-bit files.

- The IM driver now reads and saves "1" images (file modes "0 1" or "L 1").

- The JPEG and GIF drivers now saves "1" images. For JPEG, the image
is saved as 8-bit grayscale (it will load as mode "L"). For GIF, the
image will be loaded as a "P" image.

- Fixed a potential buffer overrun in the GIF encoder.

0.3a2

-----

The test suite includes 400 individual tests.

- Improvements to the test suite revealed a number of minor bugs, which
are all fixed. Note that crop/paste, 32-bit ImageDraw, and ImageFont
are still weak spots in this release.

- Added "putpalette" method to the Image class. You can use this
to add or modify the palette for "P" and "L" images. If a palette
is added to an "L" image, it is automatically converted to a "P"
image.

- Fixed ImageDraw to properly handle 32-bit image memories
("RGB", "RGBA", "CMYK", "F")

- Fixed "fromstring" and "tostring" not to mess up the mode attribute
in default mode.

- Changed ImPlatform.h to work on CRAY's (don't have one at home, so I
haven't tried it). The previous version assumed that either "short"
or "int" were 16-bit wide. PIL still won't compile on platforms where
neither "short", "int" nor "long" are 32-bit wide.

- Added file= and data= keyword arguments to PhotoImage and BitmapImage.
This allows you to use them as drop-in replacements for the corresponding
Tkinter classes.

- Removed bogus references to the crack coder (ImagingCrack).

0.3a1

-----

- Make sure image is loaded in "tostring".

- Added floating point packer (native 32-bit floats only).

Page 23 of 24

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.