Commit Graph

16527 Commits

Author SHA1 Message Date
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
Andrew Murray
e6beb81523 Updated macOS tested Pillow versions 2023-07-06 13:22:50 +10:00
Hugo van Kemenade
3ffa8dca44
Merge pull request #7262 from daimrod/doc-wal-add-link-to-putpalette 2023-07-05 14:43:51 +03:00
Grégoire Jadi
9a32c0f821
doc WAL: Add link to PIL.Image.Image.putpalette
[ci skip]
2023-07-05 11:26:46 +02:00
Andrew Murray
5e2332a200 Corrected drawing I;16 points 2023-07-05 08:49:56 +10:00
mergify[bot]
3ee9259150
Merge pull request #7258 from radarhere/libjpeg
Updated libjpeg shared library name
2023-07-04 14:17:51 +00:00
Andrew Murray
5a9c2321b4 Updated libjpeg shared library name 2023-07-04 22:39:41 +10:00
Hugo van Kemenade
be828f4d62
Merge pull request #7254 from radarhere/libjpeg_turbo
Updated libjpeg-turbo to 3.0.0
2023-07-04 07:44:58 +03:00
Hugo van Kemenade
55de09ae95
Merge pull request #393 from radarhere/libjpeg_turbo
Updated libjpeg-turbo to 3.0.0
2023-07-04 07:44:37 +03:00
mergify[bot]
84af332bf1
Merge pull request #7253 from python-pillow/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-07-03 22:37:52 +00:00
Andrew Murray
082c43656d Updated libjpeg-turbo to 3.0.0 2023-07-04 08:29:17 +10:00
Andrew Murray
99a03d403f Updated libjpeg-turbo to 3.0.0 2023-07-04 08:26:50 +10:00
pre-commit-ci[bot]
9e31a677b9
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/yesqa: v1.4.0 → v1.5.0](https://github.com/asottile/yesqa/compare/v1.4.0...v1.5.0)
- [github.com/tox-dev/tox-ini-fmt: 1.3.0 → 1.3.1](https://github.com/tox-dev/tox-ini-fmt/compare/1.3.0...1.3.1)
2023-07-03 19:29:28 +00:00
Andrew Murray
a97422d2fe
Merge pull request #7249 from Yay295/update_c_type_obj
Update PyTypeObject slot names
2023-07-03 19:43:50 +10:00
Hugo van Kemenade
6b0b905a88
Merge pull request #7248 from mgorny/wheel 2023-07-02 19:27:23 +03:00
Yay295
e7398c7888 update PyTypeObject slot names
tp_print was renamed to tp_vectorcall_offset with Python 3.8, and tp_compare was renamed to tp_as_async with Python 3.5.
tp_size has always been tp_basicsize; I don't know why that one was wrong.
2023-07-02 00:52:08 -05:00
Michał Górny
d56fb2435d Remove redundant wheel dep from pyproject.toml
Remove the redundant `wheel` dependency, as it is added by the backend
automatically.  Listing it explicitly in the documentation was
a historical mistake and has been fixed since, see:
f7d30a9529

While Pillow uses a custom backend that modifies the `bdist_wheel`
method, it does not import `wheel` or use it in a way that would rely
on setuptools implementation details.
2023-07-02 04:13:02 +02:00
Andrew Murray
1ffe3354d7 10.1.0.dev0 version bump 2023-07-02 00:59:40 +10:00
Andrew Murray
b2eed6e689 Pillow -> 10.0.0 2023-07-01 23:05:00 +10:00
Andrew Murray
6e28ed1f36 10.0.0 version bump 2023-07-01 22:08:11 +10:00
Andrew Murray
74859e965d Moved MAX_IMAGE_PIXELS check to Python 2023-07-01 20:52:44 +10:00
Andrew Murray
c827f3b30f
Merge pull request #7246 from radarhere/deallocate
Fixed deallocating mask images
2023-07-01 20:35:41 +10:00
Andrew Murray
39a3b1d83e Fixed deallocating mask images 2023-07-01 18:09:27 +10:00
Andrew Murray
8c1dc819fd
Update CHANGES.rst [ci skip] 2023-07-01 10:31:34 +10:00
Andrew Murray
e37b25087d
Merge pull request #7244 from radarhere/imagefont_max_string_length
Added ImageFont.MAX_STRING_LENGTH
2023-07-01 09:41:01 +10:00
Andrew Murray
d398fedb9d
Added underscores for readability
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-07-01 07:25:18 +10:00
Andrew Murray
1fe1bb49c4 Added ImageFont.MAX_STRING_LENGTH 2023-06-30 23:32:26 +10:00
Hugo van Kemenade
7c945f5131
Merge pull request #7243 from radarhere/releasenotes 2023-06-30 10:59:47 +03:00
Andrew Murray
0fb69fa821 Added release notes for #7123 2023-06-30 16:59:36 +10:00
Hugo van Kemenade
b7f1af77fd
Merge pull request #7230 from nulano/add-pyproject.toml 2023-06-30 09:31:41 +03:00
Hugo van Kemenade
0ac3677b56
Merge pull request #7199 from radarhere/tiff_close 2023-06-30 09:27:26 +03:00
Hugo van Kemenade
9abef1ad0b
Merge pull request #7226 from radarhere/getcolor 2023-06-30 09:26:51 +03:00
Hugo van Kemenade
be4bfaac9e
Merge pull request #7123 from radarhere/apng 2023-06-30 09:24:20 +03:00
Hugo van Kemenade
bd795d7c02
Merge pull request #7242 from radarhere/repr_png
Prioritise speed in _repr_png_
2023-06-30 08:29:47 +03:00
Andrew Murray
0740499151 Prioritise speed in _repr_png_ 2023-06-30 09:05:59 +10:00
Hugo van Kemenade
1174a9e7f4
Merge pull request #7097 from radarhere/seek
`Image.open()` seeks to the start of file objects
2023-06-30 01:05:47 +03:00
Hugo van Kemenade
a662fb6793
Merge pull request #7239 from radarhere/releasenotes
Added release notes for #7235
2023-06-29 15:24:38 +03:00
Andrew Murray
49cde0ad3d Update CHANGES.rst [ci skip] 2023-06-29 21:03:42 +10:00
Andrew Murray
ae43cda4c5 Added release notes for #7235 2023-06-29 20:59:24 +10:00
Hugo van Kemenade
2de1bf221a
Merge pull request #7236 from radarhere/pyaccess 2023-06-29 13:58:50 +03:00
Hugo van Kemenade
b2387f9565
Merge pull request #7233 from radarhere/libtiff 2023-06-29 13:56:12 +03:00
Hugo van Kemenade
36fb14cee7
Merge pull request #391 from radarhere/libtiff 2023-06-29 13:56:07 +03:00