Changes in Python Imaging Library 1.1.6

Welcome to!

The 1.1.6 release is available from PythonWare, as well as from the downloads section.

Changes from release 1.1.5 to 1.1.6

(1.1.6 released)

  • Fixed some 64-bit compatibility warnings for Python 2.5.
  • Added threading support for the Sane driver (from Abel Deuring).

(1.1.6b2 released)

  • Added experimental “floodfill” function to the ImageDraw module (based on code by Eric Raymond).
  • The default arguments for “frombuffer” doesn’t match “fromstring” and the documentation (reported by Dan Torop); this is a bug, and will most likely be fixed in a future version. In this release, PIL prints a warning message instead. To silence the warning, change any calls of the form “frombuffer(mode, size, data)” to
    frombuffer(mode, size, data, "raw", mode, 0, 1)
  • Added “fromarray” function, which takes an object implementing the NumPy array interface and creates a PIL Image from it. (from Travis Oliphant).
  • Added NumPy array interface support (__array_interface__) to the Image class (based on code by Travis Oliphant). This allows you to easily convert between PIL image memories and NumPy arrays:
    import numpy, Image
    i ='lena.jpg')
    a = numpy.asarray(i) # a is readonly
    i = Image.fromarray(a)
  • Fixed CMYK polarity for JPEG images, by treating all images as “Adobe CMYK” images. (thanks to Cesare Leonardi and Kevin Cazabon for samples, debugging, and patches).

(1.1.6b1 released)

  • Added ‘expand’ option to the Image ‘rotate’ method. If true, the output image is made large enough to hold the entire rotated image.
  • Changed the ImageDraw ‘line’ method to always draw the last pixel in a polyline, independent of line angle.
  • Fixed bearing calculation and clipping in the ImageFont truetype renderer; this could lead to clipped text, or crashes in the low-level _imagingft module. (based on input from Adam Twardoch and others).
  • Added ImageQt wrapper module, for converting PIL Image objects to QImage objects in an efficient way.
  • Fixed ‘getmodebands’ to return the number of bands also for “PA” and “LA” modes. Added ‘getmodebandnames’ helper that return the band names.

(1.1.6a2 released)

  • Added float/double support to the TIFF loader (from Russell Nelson).
  • Fixed broken use of realloc() in path.c (from Jan Matejek)
  • Added save support for Spider images (from William Baxter).
  • Fixed broken ‘paste’ and ‘resize’ operations in pildriver (from Bill Janssen).
  • Added support for duplex scanning to the Sane interface (Abel Deuring).

(1.1.6a1 released)

  • Fixed a memory leak in “convert(mode)”, when converting from L to P.
  • Added pixel access object. The “load” method now returns an access object that can be used to directly get and set pixel values, using ordinary [x, y] notation:
    pixel = im.load()
    v = pixel[x, y]
    pixel[x, y] = v
  • Fixed building on Cygwin (from Miki Tebeka).
  • Fixed “point(callable)” on unloaded images (reported by Håkan Karlsson).
  • Fixed ImageMath float() and int() operations for Python 2.4 (reported by Don Rozenberg).
  • Fixed “RuntimeError: encoder error -8 in tostring” problem for wide “RGB”, “I”, and “F” images.
  • Fixed line width calculation.

(1.1.6a0 released)

  • Fixed byte order issue in Image.paste(ink) (from Ka-Ping Yee).
  • Fixed off-by-0.5 errors in the ANTIALIAS code (based on input from Douglas Bagnall).
  • Added buffer interface support to the Path constructor. If a buffer is provided, it is assumed to contain a flat array of float coordinates (e.g. array.array(‘f’, seq)).
  • Added new ImageMath module.
  • Fixed ImageOps.equalize problems when used with a small number of distinct values (reported by David Kirtley).
  • Fixed potential integer division in PSDraw.image (from Eric Etheridge).

A Django site. rendered by a django application. hosted by webfaction.