|
| 1 | +8.3.1 |
| 2 | +----- |
| 3 | + |
| 4 | +Fixed regression converting to NumPy arrays |
| 5 | +=========================================== |
| 6 | + |
| 7 | +This fixes a regression introduced in 8.3.0 when converting an image to a NumPy array |
| 8 | +with a ``dtype`` argument. |
| 9 | + |
| 10 | +.. code-block:: pycon |
| 11 | +
|
| 12 | + >>> from PIL import Image |
| 13 | + >>> import numpy |
| 14 | + >>> im = Image.new("RGB", (100, 100)) |
| 15 | + >>> numpy.array(im, dtype=numpy.float64) |
| 16 | + Traceback (most recent call last): |
| 17 | + File "<stdin>", line 1, in <module> |
| 18 | + TypeError: __array__() takes 1 positional argument but 2 were given |
| 19 | + >>> |
| 20 | +
|
| 21 | +Catch OSError when checking if destination is sys.stdout |
| 22 | +======================================================== |
| 23 | + |
| 24 | +In 8.3.0, a check to see if the destination was ``sys.stdout`` when saving an image was |
| 25 | +updated. This lead to an OSError being raised if the environment restricted access. |
| 26 | + |
| 27 | +The OSError is now silently caught. |
| 28 | + |
| 29 | +Fixed removing orientation in ImageOps.exif_transpose |
| 30 | +===================================================== |
| 31 | + |
| 32 | +In 8.3.0, :py:meth:`~PIL.ImageOps.exif_transpose` was changed to ensure that the |
| 33 | +original image EXIF data was not modified, and the orientation was only removed from |
| 34 | +the modified copy. |
| 35 | + |
| 36 | +However, for certain images the orientation was already missing from the modified |
| 37 | +image, leading to a KeyError. |
| 38 | + |
| 39 | +This error has been resolved, and the copying of metadata to the modified image |
| 40 | +improved. |
0 commit comments