Commit Graph

112 Commits

Author SHA1 Message Date
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
c5d1b15824 Do not unintentionally load TIFF format at first 2023-01-14 22:45:29 +11:00
Hugo van Kemenade
2ae55ccbda Improve exception traceback readability 2022-12-30 00:07:52 +02: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
eddc9bdcec
switch to #z for comment parameter
* means `comment=None` can be passed directly
* no need to conditionally run `str.encode()`
* clean up checking of whether a comment is passed
2022-12-05 17:46:54 +00:00
Andrew Murray
e50ae85ea4 Use jpeg_write_marker to write comment 2022-12-05 13:57:26 +11:00
Andrew Murray
c1d0a00943 Use _binary instead of struct 2022-12-03 09:31:05 +11:00
Andrew Murray
976ad5746a Save comments from any image format by default 2022-12-03 09:29:02 +11:00
pre-commit-ci[bot]
e9f4858491 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-12-02 18:07:10 +00:00
Sam Mason
d822d85af6
support round-tripping JPEG comments 2022-12-02 17:57:19 +00:00
Andrew Murray
2944ff18d6 Support saving multiple MPO frames 2022-07-16 20:02:58 +10:00
Andrew Murray
bcded33cee
Merge pull request #6195 from hugovk/cleanup
Cleanup: various
2022-04-26 18:51:44 +10:00
Andrew Murray
5d4258e72b Simplified index slicing 2022-04-25 22:52:29 +10:00
Hugo van Kemenade
ee85e387ba Remove redundant parentheses 2022-04-10 23:39:54 +03:00
Hugo van Kemenade
4cb8e4b3fa Add deprecations helper 2022-04-06 13:19:52 +03:00
Andrew Murray
ae8de77721 Raise ValueError when trying to save empty image 2022-03-28 21:18:53 +11:00
Hugo van Kemenade
601c9d8515 Fix return in docs 2022-02-09 14:28:43 +02:00
Andrew Murray
1059eb5376 If appended EOI did not work, do not keep trying 2022-01-01 21:04:32 +11:00
Hugo van Kemenade
6e310e3e2e Update expected Pillow 10 release date: 2023-07-01 2021-10-18 15:48:49 +03:00
Andrew Murray
8ab06b4dac Updated comment [ci skip] 2021-08-01 21:06:33 +10:00
Alexander Karpinsky
3abe5e884b Add TypeError handling to pass corrupted dpi value in exif 2021-07-26 16:13:01 +03:00
Andrew Murray
d11c794997 Merge branch 'master' into 4962-jpeg-zigzag 2021-06-30 20:54:55 +10:00
Andrew Murray
70c7514a4a
Added specific removal details 2021-06-30 19:29:52 +10:00
Andrew Murray
d9d811ff21 Replaced xml.etree.ElementTree with defusedxml.ElementTree 2021-06-30 11:28:44 +10:00
Andrew Murray
cd31dae0d1 Added getxmp() for PNG 2021-06-12 13:57:14 +10:00
Andrew Murray
ae3bdf87f0 Added getxmp() for TIFF 2021-06-12 12:17:38 +10:00
Andrew Murray
c1fbe2d975 Corrected getxmp() descending into XML 2021-06-12 11:58:11 +10:00
Andrew Murray
18e204df05 Removed DPI rounding from JPEG loading 2021-05-07 21:23:29 +10:00
Andrew Murray
4351c37fc4 Corrected adobe_transform value 2021-04-15 21:49:51 +10:00
Andrew Murray
7a4bf3df0f Changed exception type to be more specific 2021-04-15 20:55:45 +10:00
Andrew Murray
e12d5042ad Adjusted docstring 2021-04-01 22:28:42 +11:00
Andrew Murray
2c8684c525 Moved getxmp() into JpegImageFile 2021-04-01 22:28:37 +11:00
Andrew Murray
faf8fad76d Stopped flattening EXIF IFD into getexif() 2021-02-22 07:47:05 +11:00
Alexander
1ff61bcaa6 use offset for all binary input functions instead of slicing 2020-12-30 19:10:50 +11:00
Alexander
3757b8c748 remove extra i8 calls where input is proved bytes[] or int 2020-12-30 19:04:11 +11:00
gofr
4dc195333e fixup! De-zigzag JPEG's DQT when loading; deprecate convert_dict_qtables 2020-10-17 20:45:54 +02:00
gofr
9980981c2e De-zigzag JPEG's DQT when loading; deprecate convert_dict_qtables
Re-order the JPEG quantization tables to normal order when
loading. This wastes a few CPU cycles if you don't need them.
But it has the advantage of hiding the zigzag order JPEG
implementation detail of these tables completely from Pillow
users.

This difference has led to cases where:
* arrays in zigzag order were taken from a dict and passed
  directly as a qtables parameter, causing them to be "zigzagged"
  again by libjpeg.
* dicts with lists in normal order being passed to
  JpegImagePlugin.convert_dict_qtables, causing them to be
  unnecessarily "de-zigzagged".
2020-10-17 20:20:59 +02:00
Hugo van Kemenade
1cb3e2f742
Merge pull request #4918 from gofr/4825-jpeg-16-bit-qt 2020-10-14 17:58:12 +03:00
gofr
0a235314b8 Remove outdated comment about 8-bit DQT support 2020-10-10 15:26:44 +02:00
gofr
6db0843af4 Add support for 16-bit precision JPEG quantization values
Don't force JPEG quantization to be baseline-compatible

Quantization values will not be limited to values 1..255 and may
be 16 bits if needed. This may cause compatibility issues.
2020-10-10 14:35:09 +02:00
Andrew Murray
88f9ef2f6b Removed unused function 2020-10-09 01:16:23 +11:00
Hugo van Kemenade
e0eec1eb56 Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
Hugo van Kemenade
10615a7da7 Upgrade Python syntax for 3.6+
Co-authored-by: nulano <nulano@nulano.eu>
2020-07-30 10:09:18 +03:00
Hugo van Kemenade
109c637ddb 'plugin', formatting and typos 2020-07-03 09:38:30 +03:00
Andrew Murray
4ae694cd7b
Merge pull request #4712 from cool-RR/2020-06-12-raise-from
Fix exception causes all over the codebase
2020-06-28 15:22:05 +10:00
Andrew Murray
9b6fdd719f Call _accept instead of duplicating code 2020-06-23 17:41:13 +10:00
Andrew Murray
96d1a8b418 Updated _open check to match _accept 2020-06-23 00:25:59 +10:00
Ram Rachum
2f0d430807 Fix exception causes all over the codebase 2020-06-21 13:21:25 +03:00
Kirill Kuzminykh
f99e0b824b Replaced primitive "magic number" inside of JpegImagePlugin._accept() function by more correct version. 2020-06-18 16:18:18 +03:00