Commit Graph

18743 Commits

Author SHA1 Message Date
Andrew Murray
1aa0ade1b6 Update CHANGES.rst [ci skip] 2023-07-31 11:45:00 +10:00
Andrew Murray
07038d7e89
Merge pull request #7266 from mtreinish/handle-repr-exceptions
Handle exceptions in _repr_jpeg_ and _repr_png_
2023-07-31 11:42:44 +10:00
Andrew Murray
00cec60c35 Added CMYK to RGB unpacker 2023-07-29 21:05:33 +10:00
Andrew Murray
9979a822c7 Changed Image mode property to be read-only by default 2023-07-29 09:28:18 +10:00
Andrew Murray
9bd574058e Support BGR;15, BGR;16 and BGR;24 in putdata 2023-07-26 20:09:40 +10:00
Andrew Murray
5fa05623ff Added BGR;15, BGR;16 and BGR;24 unpacking 2023-07-26 20:09:40 +10:00
Andrew Murray
3230270aa7 Added BGR;15, BGR;16 and BGR;24 access 2023-07-26 20:09:40 +10:00
Andrew Murray
07623d1a7c
Merge pull request #7305 from hugovk/docs-clarify-textlength-return
Docs: Clarify that a single value is returned, and depends on the text direction
2023-07-26 08:16:34 +10:00
Hugo van Kemenade
62cd236d1a Clarify that a single value is returned, and depends on the text direction 2023-07-25 12:31:58 +03:00
Matthew Treinish
2a55b140b1
Merge pull request #1 from radarhere/handle-repr-exceptions
Simplified code
2023-07-24 19:16:38 -04:00
Andrew Murray
2db354af43 Allow saving I;16B images as PNG 2023-07-24 17:17:15 +10:00
Hugo van Kemenade
3c5324b07c
Merge pull request #7300 from radarhere/test
Parametrized test
2023-07-23 09:12:40 +02:00
Andrew Murray
e5c94eced2 Simplified code 2023-07-23 16:26:42 +10:00
Hugo van Kemenade
06e66f7f5c
Merge pull request #7296 from radarhere/access 2023-07-22 22:02:15 +02:00
Andrew Murray
0a0a3fc51f Added saving LA images as PDFs 2023-07-22 20:16:45 +10:00
Andrew Murray
26ca569cbe Parametrized test 2023-07-22 20:15:40 +10:00
Andrew Murray
c108d9ddb0 Set alpha channel when saving LA in OpenJPEG 2023-07-22 20:05:31 +10:00
Andrew Murray
ea0abb94cc
Merge pull request #7298 from radarhere/ppm
Added more information about PPM formats
2023-07-22 20:04:17 +10:00
Andrew Murray
064cd6fb83 Added more information about PPM formats 2023-07-22 18:47:55 +10:00
Andrew Murray
577a4d8bf8 Change get_pixel to be specific to images with 2 bands 2023-07-21 21:08:20 +10:00
Andrew Murray
7ffad80294 Removed put_pixel 2023-07-21 20:59:28 +10:00
Andrew Murray
32eec53c43 Removed comment 2023-07-17 23:50:59 +10:00
Andrew Murray
fd310512b9 Set C palette to be empty by default 2023-07-17 23:04:43 +10:00
Andrew Murray
7bfc6f16dc Set undefined palette values to black 2023-07-17 09:26:24 +10:00
Andrew Murray
b945154097
Merge pull request #7286 from radarhere/numpy_cygwin
Include NumPy version in Cygwin pip cache key
2023-07-15 18:22:45 +10:00
Andrew Murray
f965b9a81f Update CHANGES.rst [ci skip] 2023-07-14 22:45:29 +10:00
Andrew Murray
1f3ec1b8c9 Include NumPy version in Cygwin pip cache key 2023-07-14 18:25:26 +10:00
Hugo van Kemenade
7a2510cf6b
Merge pull request #7284 from radarhere/gif 2023-07-13 16:05:05 +03:00
Hugo van Kemenade
5b3c20430b
Merge pull request #7285 from radarhere/python312 2023-07-13 16:02:43 +03:00
Andrew Murray
7d7bc2671d
Merge pull request #7280 from hugovk/add-3.12
Declare support for Python 3.12
2023-07-13 20:20:02 +10:00
Andrew Murray
414694e190 Increment Python version check to support Python 3.12 2023-07-13 17:21:06 +10:00
Hugo van Kemenade
7b2c803c56
Fix 3.1 to 3.10
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2023-07-13 08:32:44 +03:00
Andrew Murray
a682ceaf47 Do not use transparency if it has been removed when normalizing mode 2023-07-13 15:20:44 +10:00
Hugo van Kemenade
ab990fab77 Add support for Python 3.12 2023-07-12 16:31:45 +03:00
Andrew Murray
3f78ba80f9 Do not require curly bracket in tag name 2023-07-10 22:05:28 +10:00
Andrew Murray
2488167f33 Allow for zero-byte padding at end of XMP data 2023-07-10 22:00:30 +10:00
mergify[bot]
cfd5c8a3d2
Merge pull request #395 from radarhere/harfbuzz
Updated harfbuzz to 8.0.0
2023-07-09 14:55:33 +00:00
mergify[bot]
7a1e28404d
Merge pull request #7272 from radarhere/harfbuzz
Updated harfbuzz to 8.0.0
2023-07-09 13:11:21 +00:00
Andrew Murray
16f5c6d5d7 Updated harfbuzz to 8.0.0 2023-07-09 21:51:42 +10:00
Andrew Murray
9cf3d73b1d Updated harfbuzz to 8.0.0 2023-07-09 21:46:29 +10:00
Andrew Murray
1953e43538
Update CHANGES.rst [ci skip] 2023-07-09 15:00:41 +10:00
Andrew Murray
e96f217c60
Merge pull request #7270 from heitbaum/libtiff
Fix missing symbols as libtiff can depend on libjpeg
2023-07-09 14:57:58 +10:00
Rudi Heitbaum
d17947e802 Fix missing symbols as libtiff can depend on libjpeg
when compiling Pillow with libtiff and libjpeg (with jpeg12 enabled -
which is the default with libjpeg-3.0.0) the libtiff object
tif_jpeg_12.c.o uses the following libjpeg12 functions:
jpeg12_read_raw_data, jpeg12_read_scanlines, jpeg12_write_raw_data,
jpeg12_write_scanlines.

update the ordering of libs.append(feature.tiff) to be before
libs.append(feature.jpeg) to allow the linker to include the required
functions.

this issue occurs when the libtiff and libjpeg libraries are static
(not shared.)

Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
2023-07-08 12:46:34 +00:00
mergify[bot]
535b4378e1
Merge pull request #394 from radarhere/py2app_libwebp
Fix py2app "New Mach-O header is too large" error
2023-07-08 08:11:21 +00:00
Andrew Murray
ac0a8513d0 Fix py2app "New Mach-O header is too large" error 2023-07-08 16:25:44 +10:00
Andrew Murray
ba9c830b03 Corrected writing I;16 text 2023-07-08 11:30:48 +10:00
Matthew Treinish
6215cd3e0f
Update tests to handle no longer raising 2023-07-06 09:28:35 -04:00
Matthew Treinish
9517feccd9
Update src/PIL/Image.py
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2023-07-06 09:00:00 -04:00
Matthew Treinish
6d440ac995
Handle exceptions in _repr_jpeg_ and _repr_png_
In 10.0.0 a _repr_jpeg_ implementation was added to the Image object to
enable the use of display_jpeg() in IPython environments. However, in
some cases the implementation of this method could result in an
exception being raised while trying to generate the jpeg data. The best
example is if the image data is in an RGBA format as a result of the
object being created by opening a PNG file. In this case trying to save
the Image object as a jpeg will error because the jpeg format can't
represent the transparency in the alpha channel. This results in an
exception being raised in the IPython/Jupyter context when outputing the
image object. However, in cases like this IPython allows the repr
methods to return None to indicate there is no representation in that
format available. [1] This commit updates the _repr_png_ and _repr_jpeg_
methods to catch any exception that might be raised while trying to
generate the image data. If an exception is raised we treat that as not
being able to generate image data in that format and return None
instead.

Related to #7259

[1] https://ipython.readthedocs.io/en/stable/config/integrating.html#custom-methods
2023-07-06 08:42:37 -04:00
Hugo van Kemenade
f089c2db8c
Merge pull request #7264 from radarhere/macos 2023-07-06 09:25:29 +03:00