Andrew Murray
a54d28a7bc
Merge branch 'main' into improved_dds
2023-10-21 14:27:31 +11:00
Andrew Murray
19aeed07bf
Merge branch 'main' into gray
2023-10-20 07:47:17 +11:00
Andrew Murray
d682c18ded
Use "gray" more consistently
2023-10-19 19:12:01 +11:00
Andrew Murray
8b71f3d3c1
Added messages to errors
2023-10-19 18:42:41 +11:00
Andrew Murray
5e9a2e3000
Renamed "tile_args" to "args" for consistency with existing ImageFile variable
2023-10-17 19:10:24 +11:00
Hugo van Kemenade
ebefb5f1e0
Merge pull request #7442 from radarhere/warning
2023-10-14 01:30:59 +02:00
Andrew Murray
31df7b1655
Use new() instead of Image()._new()
2023-10-13 15:41:26 +11:00
REDxEYE
2a6bcc18fe
Add missing annotation import
2023-10-12 22:19:39 +03:00
REDxEYE
6dd565b4a3
Merge remote-tracking branch 'pillow/main' into improved_dds
...
# Conflicts:
# Tests/test_file_dds.py
# src/PIL/DdsImagePlugin.py
2023-10-12 19:15:06 +03:00
REDxEYE
a5dde8b1c4
Apply suggestion for PR
2023-10-12 19:09:28 +03:00
Andrew Murray
f24222a954
Merge branch 'main' into jpeg_xmp
2023-10-06 17:23:53 +11:00
Hugo van Kemenade
5f04b3d278
Merge pull request #7289 from radarhere/undefined_palette
2023-10-05 09:31:02 -06:00
Andrew Murray
29d23cfe07
Fixed invalid argument warning
2023-10-04 13:56:58 +11:00
Andrew Murray
e27d7a6f84
Changed has_transparency_data() to property
2023-09-26 20:14:22 +10:00
Andrew Murray
1c30809245
Allow for LA or PA in the future
2023-09-26 20:10:52 +10:00
Andrew Murray
faa66eaa6c
Added type hint
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-26 20:10:12 +10:00
Andrew Murray
6bbed1add0
Added has_transparency_data()
2023-09-25 20:10:44 +10:00
Andrew Murray
cabfed9137
Describe Image.MIME in register_mime()
2023-09-16 09:34:17 +10:00
Andrew Murray
cee8fd0788
Improved init() and preinit() documentation
2023-09-16 09:34:04 +10:00
Andrew Murray
51a6d45566
Map buffer into (0, 0) image
2023-08-31 16:31:45 +10:00
Andrew Murray
f9f367fe54
Always cast to a tuple
...
Co-authored-by: Alexander Karpinsky <homm86@gmail.com>
2023-08-30 07:27:09 +10:00
Andrew Murray
69a81dd867
Convert list to tuple in Python instead of C
2023-08-28 22:43:20 +10:00
Hugo van Kemenade
c1c474a1f2
Merge pull request #7307 from radarhere/mode
2023-07-31 17:14:10 +03:00
Andrew Murray
9979a822c7
Changed Image mode property to be read-only by default
2023-07-29 09:28:18 +10:00
Andrew Murray
e5c94eced2
Simplified code
2023-07-23 16:26:42 +10:00
Andrew Murray
fd310512b9
Set C palette to be empty by default
2023-07-17 23:04:43 +10:00
Andrew Murray
3f78ba80f9
Do not require curly bracket in tag name
2023-07-10 22:05:28 +10: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
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
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
Andrew Murray
811bfe3658
Do not use CFFI access by default on PyPy
2023-06-28 17:57:02 +10:00
Andrew Murray
8437d98f7f
Limit size even if one dimension is zero
2023-06-28 11:43:05 +10:00
Andrew Murray
b0b0798820
Lint fix
2023-06-23 22:22:33 +10:00
Rozie
43a12542ad
Update Image.show docs to list all viewers used on linux
...
[ci skip]
Accurate description of how default viewer is chosen
2023-06-23 15:05:28 +03:00
Andrew Murray
cb8956fffb
Convert to HSV if mode is HSV in getcolor()
2023-06-22 23:27:45 +10:00
pre-commit-ci[bot]
3602e35818
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2023-06-15 02:37:36 +03:00
REDxEYE
de2b4be9b9
Add Tile namedtuple for code readability.
...
Add typing info to Image.tile
2023-06-15 02:30:31 +03:00
mergify[bot]
561986ee71
Merge pull request #7092 from radarhere/exif_transpose
...
Added in_place argument to ImageOps.exif_transpose()
2023-06-14 07:24:47 +00:00
Andrew Murray
044de40c93
Document that alpha_only is a keyword-only argument
2023-06-14 11:28:14 +10:00
Andrew Murray
17b19b5668
Merge branch 'main' into apng
2023-06-14 11:26:42 +10:00
Andrew Murray
d7c7b832f1
Highlight code
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-06-14 11:25:42 +10:00
Andrew Murray
bae918280d
Changed alpha_only to keyword-only argument
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-06-14 11:25:12 +10:00
Andrew Murray
8bbd4ada9b
Merge branch 'main' into exif_transpose
2023-06-14 09:57:25 +10:00
Andrew Murray
c24c1ccf81
Use "not in"
...
Co-authored-by: Aarni Koskela <akx@iki.fi>
2023-06-14 08:52:55 +10:00
Andrew Murray
aeb6e9909e
Removed unused argument
2023-06-10 15:57:05 +10:00
Ishant Mrinal Haloi
f328383763
Apply suggestions from code review
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-05-14 11:11:56 +05:30
Andrew Murray
59b7a48570
Updated docstrings
2023-05-13 12:24:50 +10:00