Andrew Murray
70b3815a37
Merge pull request #8127 from radarhere/multiple_exif_markers
...
Fixed processing multiple JPEG EXIF markers
2024-06-28 18:50:19 +10:00
Andrew Murray
cc83cc8ec8
Updated type hints
2024-06-22 10:09:11 +10:00
Andrew Murray
7ab3aee7bc
Merge branch 'main' into xmp
2024-06-19 09:06:10 +10:00
Andrew Murray
291ee35204
Added type hints
2024-06-18 23:03:03 +10:00
Andrew Murray
b84c970fbf
Wait until all markers are read to process EXIF
2024-06-10 19:19:06 +10:00
Andrew Murray
1a14957c19
Added type hints
2024-06-09 15:16:17 +10:00
Andrew Murray
923d4e5e1a
Added type hints
2024-06-05 22:27:23 +10:00
Andrew Murray
eba2694498
Merge branch 'main' into xmp
2024-06-05 15:53:46 +10:00
Andrew Murray
66ab7e0de2
Added type hints
2024-06-01 21:31:53 +10:00
Andrew Murray
e68cec640a
Added type hints
2024-05-30 12:00:50 +10:00
Andrew Murray
0f1a0fc501
Improved consistency of XMP handling
2024-05-20 23:11:50 +10:00
Hugo van Kemenade
a6c7a04c00
Merge pull request #7856 from radarhere/docs
...
Corrected exiv2.org links
2024-03-30 22:19:57 +02:00
Hugo van Kemenade
3cdd49f31f
Merge pull request #7801 from radarhere/codecs
2024-03-11 17:38:12 +02:00
Andrew Murray
bc00c26edd
Corrected links
2024-03-04 22:48:51 +11:00
Andrew Murray
6d78d42769
Added type hints
2024-03-02 13:12:17 +11:00
Andrew Murray
3199c0ea40
Decoder and encoders subclass PyDecoder and PyEncoder
2024-02-15 20:24:08 +11:00
Andrew Murray
4ce06aac3b
Added type hints
2024-02-12 23:01:44 +11:00
Andrew Murray
cdc498e6f3
Added type hints
2024-02-07 19:16:28 +11:00
Hugo van Kemenade
4a4b90c365
Autotype tests ( #7756 )
...
* autotyping: --none-return
* autotyping: --scalar-return
* autotyping: --int-param
* autotyping: --float-param
* autotyping: --str-param
* autotyping: --annotate-named-param tmp_path:pathlib.Path
2024-01-31 20:12:58 +11:00
Hugo van Kemenade
53c3cd9f8e
isort Tests
2024-01-20 13:23:03 +02:00
Andrew Murray
d93a5ad70b
Merge pull request #7553 from bgilbert/jpeg-rgb
...
Add `keep_rgb` option when saving JPEG to prevent conversion of RGB colorspace
2024-01-01 23:55:37 +11:00
Hugo van Kemenade
6c4b47dc46
Merge pull request #7496 from radarhere/exif
2023-12-31 17:39:21 +02:00
Benjamin Gilbert
372083c59f
Check similarity of round-tripped YCbCr JPEG, for symmetry with RGB
2023-12-28 13:00:17 -06:00
Benjamin Gilbert
a5fab5fc0b
Fail if chroma subsampling selected when writing RGB JPEG
...
The user presumably doesn't intend to subsample the green and blue
channels.
2023-12-26 12:37:35 -06:00
Hugo van Kemenade
43b2f61e79
Add 'from __future__ import annotations' using Ruff/isort
2023-12-21 13:13:31 +02:00
Benjamin Gilbert
14146732be
Clarify JPEG tests for default/invalid subsampling
...
-1 is the default; 3 is invalid and should behave the same as the default.
2023-12-13 18:26:35 -06:00
Andrew Murray
f90827dfc8
Rearranged subsampling assertions
2023-12-13 18:26:35 -06:00
Benjamin Gilbert
4b422db243
Add keep_rgb option to prevent RGB -> YCbCr conversion during JPEG write
...
libjpeg automatically converts RGB to YCbCr by default. Add a keep_rgb
option to disable libjpeg's automatic conversion of RGB images during
write.
2023-12-13 18:26:35 -06:00
Andrew Murray
4b308dc2bf
Merge pull request #7488 from bgilbert/jpeg-restart
...
Allow configuring JPEG restart marker interval on save
2023-11-14 23:42:50 +11:00
Benjamin Gilbert
e572722479
Allow configuring JPEG restart marker interval on save
...
libjpeg allows specifying the marker interval either in MCU blocks or in
MCU rows. Support both, via separate parameters, rather than requiring
callers to do the math.
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2023-10-31 17:47:25 -05:00
Andrew Murray
e10a58ccce
Concatenate multiple EXIF markers
2023-10-26 21:46:38 +11:00
Benjamin Gilbert
4d7372bfd0
Implement streamtype=1 option for tables-only JPEG encoding
...
We already support streamtype=2 to skip producing JPEG tables, but
streamtype=1, which skips everything but the tables, was never implemented.
The streamtype=1 stub code dates to Git pre-history, so it's not
immediately clear why. Implement the missing support.
jpeg_write_tables() can't resume after a full output buffer (it fails with
JERR_CANT_SUSPEND), so it might seem that Pillow needs to pre-compute the
necessary buffer size. However, in the normal case of producing an
interchange stream, the tables are written via the same libjpeg codepath
during the first jpeg_write_scanlines() call, and table writes aren't
resumable there either. Thus, any buffer large enough for the normal case
will also be large enough for a tables-only file.
The streamtype option isn't documented and this commit doesn't change that.
It does add a test though.
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2023-10-24 20:30:45 -05:00
Andrew Murray
7319d86328
Catch struct.error from truncated EXIF when reading DPI
2023-10-12 10:13:46 +11:00
Andrew Murray
a3fd009875
Match warning message
2023-10-06 17:31:06 +11:00
Andrew Murray
f24222a954
Merge branch 'main' into jpeg_xmp
2023-10-06 17:23:53 +11:00
Andrew Murray
0a28840bc4
Expand buffer size when optimizing or progressive
2023-08-19 14:34:08 +10: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
Matthew Treinish
6215cd3e0f
Update tests to handle no longer raising
2023-07-06 09:28:35 -04:00
Andrew Murray
93e507294b
Only assert image is similar
2023-05-05 08:19:43 +10:00
Ishant Mrinal Haloi
5377b0735f
add _repr_jpg_ for ipython display
...
Signed-off-by: Ishant Mrinal Haloi <mrinal.haloi11@gmail.com>
2023-05-04 21:43:57 +05:30
Hugo van Kemenade
52f4fc59a2
Remove JpegImagePlugin.convert_dict_qtables, deprecated in 8.3.0
2023-04-06 16:11:36 +03:00
Hugo van Kemenade
d2e77de070
Merge pull request #6853 from radarhere/child_images
...
Relaxed child images check to allow for libjpeg
2023-02-12 07:26:18 +02:00
Andrew Murray
bb524018d3
Raise an error when EXIF data is too long
2023-02-11 16:20:27 +11:00
pre-commit-ci[bot]
24183d652e
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2023-02-06 19:27:19 +00:00
Andrew Murray
97385d7cc7
Relaxed child images check to allow for libjpeg
2023-01-02 19:54:12 +11:00
Andrew Murray
5257d561c0
Merge pull request #6748 from radarhere/exif_ifd
...
Added IFD enum to ExifTags
2022-12-14 07:33:14 +11:00
Andrew Murray
c2a42655e1
Allow get_child_images to access JPEG thumbnails
2022-12-06 19:30:53 +11:00
Sam Mason
1ed1a3a971
make sure passing a blank comment removes existing comment
2022-12-03 15:07:37 +00:00
Andrew Murray
525c01143a
Test that comment is reread
2022-12-03 09:59:22 +11:00