Andrew Murray
cdc498e6f3
Added type hints
2024-02-07 19:16:28 +11:00
Andrew Murray
91645f9eff
Lint fix
2024-02-07 10:19:00 +11:00
Hugo van Kemenade
811dd15ca5
Merge pull request #7769 from radarhere/type_hints
2024-02-06 23:12:26 +02:00
Andrew Murray
65cb0b0487
Added _typing.Coords
2024-02-06 07:49:43 +11:00
pre-commit-ci[bot]
27b0cf67e7
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2024-02-05 17:18:52 +00:00
Andrew Murray
5a8e7dda79
Added type hints
2024-02-05 20:36:34 +11:00
Andrew Murray
95255536cf
Merge branch 'main' into type_hints
2024-02-05 19:29:27 +11:00
Andrew Murray
dfb48ff297
Match mask size to pasted image size
2024-02-05 19:16:15 +11:00
Andrew Murray
d8f52f58be
Merge branch 'main' into main
2024-02-05 08:56:25 +11:00
Andrew Murray
2515938cdd
Simplified type hints
2024-02-02 19:04:22 +11:00
Andrew Murray
58554de0c8
Merge branch 'main' into main
2024-02-01 00:06:05 +11:00
FangFuxin
b8769d1cf5
Update Tests/test_file_png.py
...
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-01-31 21:02:50 +08:00
Andrew Murray
530512f699
Merge branch 'main' into type-hints-replace-io.BytesIO
2024-01-31 22:58:53 +11:00
Andrew Murray
bb1fece57a
Added type hints
2024-01-31 21:55:32 +11:00
Andrew Murray
2888f767f2
Merge branch 'main' into psd
2024-01-31 20:16:24 +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
Andrew Murray
5efa2ade22
Added test
2024-01-31 19:10:33 +11:00
Hugo van Kemenade
76955bbaf7
Remove shebang and execute bit
2024-01-29 18:43:51 +02:00
Hugo van Kemenade
0669532898
Remove shebangs
2024-01-29 18:43:03 +02:00
Hugo van Kemenade
d49d2d14a0
Merge branch 'main' into type-hints-replace-io.BytesIO
2024-01-28 11:22:00 +02:00
Hugo van Kemenade
61d47c3dfa
More support for arbitrary os.PathLike
2024-01-27 14:06:06 +02:00
Andrew Murray
737314923f
Added type hints
2024-01-27 15:19:43 +11:00
Hugo van Kemenade
16d4068b42
Test os.PathLike that's not pathlib.Path
2024-01-26 19:17:44 +02:00
Hugo van Kemenade
f613a9213f
Parameterise test
2024-01-26 19:17:44 +02:00
Andrew Murray
ddb7df0ec6
Added type hints
2024-01-25 22:18:46 +11:00
Andrew Murray
5721577e4e
Stop reading EPS at EOF marker
2024-01-25 20:20:53 +11:00
Andrew Murray
4175787c45
Merge pull request #7739 from radarhere/test_image_results
...
Do not support using test-image-results to upload images after test failures
2024-01-25 06:36:49 +11:00
Andrew Murray
5709ffe5da
Merge branch 'main' into test_font_leaks
2024-01-25 06:15:13 +11:00
Andrew Murray
e2d1b2663d
Restored original state using finally
...
Co-authored-by: Ondrej Baranovič <nulano@nulano.eu>
2024-01-24 08:12:06 +11:00
Andrew Murray
4814bee6c0
Use Path instead of PosixPath
2024-01-23 21:42:36 +11:00
Andrew Murray
8caae8739f
Restored testing of non-TrueType default font
2024-01-23 18:51:41 +11:00
Andrew Murray
16fd934b00
Use TypedDict
2024-01-23 09:55:25 +11:00
Andrew Murray
2521ec4732
Restored charsets dictionary
2024-01-22 22:08:45 +11:00
Andrew Murray
a09e056a4c
Added type hints
2024-01-22 18:42:43 +11:00
Andrew Murray
d331eb9c52
Added type hints
2024-01-21 19:18:51 +11:00
Andrew Murray
4674195321
Removed support for test-image-results
2024-01-21 15:01:12 +11:00
Andrew Murray
3453a99908
Merge branch 'main' into type_hints_check
2024-01-21 14:38:17 +11:00
Andrew Murray
1891b61f73
Merge pull request #7736 from hugovk/isort-tests
...
Sort imports in `Tests/`
2024-01-21 14:30:42 +11:00
Hugo van Kemenade
53c3cd9f8e
isort Tests
2024-01-20 13:23:03 +02:00
Andrew Murray
a18cee35ff
Updated import order
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-01-20 21:26:31 +11:00
pre-commit-ci[bot]
9454c28f0f
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2024-01-20 10:24:57 +00:00
Andrew Murray
970bd102ba
Updated type hint
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-01-20 21:24:34 +11:00
Andrew Murray
99d851957f
Return early
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-01-20 21:23:08 +11:00
Andrew Murray
f7701e6596
Do not log URL of test images if there is no URL
2024-01-20 21:04:57 +11:00
Andrew Murray
9b6c1e3763
Added type hints
2024-01-20 11:13:06 +11:00
Andrew Murray
1d63cffdad
Added type hints
2024-01-19 21:50:27 +11:00
Andrew Murray
81b5c5dc68
Added type hints
2024-01-19 08:37:58 +11:00
Andrew Murray
62e6d62518
Test error is raised without LOAD_TRUNCATED_IMAGES
2024-01-16 18:49:25 +11:00
Andrew Murray
fe7b6d9e80
Corrected expected image path
2024-01-16 18:43:57 +11:00
pre-commit-ci[bot]
b2711c3e8b
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2024-01-16 07:37:00 +00:00
FangFuxin
44e77a22b5
Fix png image plugin load_end func handle truncated file.
2024-01-16 07:36:20 +00:00
Hugo van Kemenade
fc67ee29d5
Merge pull request #7701 from esoma/issue-7700
2024-01-11 14:05:16 +02:00
Hugo van Kemenade
5baace9eb7
Merge pull request #7702 from nulano/deprecate-cms-constants
2024-01-11 10:51:21 +02:00
Ondrej Baranovič
5347b471c6
Update Tests/test_imagecms.py
...
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-01-11 02:08:46 +01:00
Erik Soma
6f144d45b9
Rename repeated seeks apng to reflect what it is rather than how it is used.
2024-01-10 16:03:42 -05:00
Andrew Murray
c2907dc049
Layer co-ordinates may be negative
2024-01-10 23:53:45 +11:00
Erik Soma
dc6d7611e9
Test apng repeated seeks 3 times instead of 5.
...
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-01-09 08:55:49 -05:00
Erik Soma
a6051a4045
Add type hints and fix some formatting for the apng repeated seeks test.
2024-01-08 15:20:24 -05:00
Erik Soma
a844871c5e
Give apng repeated seeks test and image a more descriptive name.
2024-01-08 15:18:49 -05:00
Andrew Murray
605208ea47
Merge branch 'main' into perspective
2024-01-09 07:16:24 +11:00
Andrew Murray
208a34c079
Merge branch 'main' into deprecate-cms-constants
2024-01-09 07:15:41 +11:00
Hugo van Kemenade
b1f549f60c
Merge pull request #7696 from nulano/pfm
2024-01-08 19:22:53 +02:00
Nulano
5dd1652f27
use filename instead of f
2024-01-08 17:17:52 +01:00
Erik Soma
3515f997ce
Add test against info of apng images getting clobbered when seeking to the first frame multiple times.
2024-01-07 20:52:22 -05:00
Andrew Murray
ccdea48cf3
Added identity tests for Transform classes
2024-01-08 10:36:30 +11:00
Nulano
08f11c57a1
deprecate ImageCms members: DESCRIPTION, VERSION, FLAGS, versions()
2024-01-08 00:32:47 +01:00
Andrew Murray
ba6399cad1
Added PerspectiveTransform
2024-01-07 19:34:27 +11:00
Hugo van Kemenade
fcaed26ab1
Merge pull request #7676 from nulano/lcms2-flags
2024-01-06 16:43:20 +02:00
Nulano
0d841aab9a
add support for grayscale pfm image format
2024-01-06 14:08:51 +01:00
Andrew Murray
2d6ad5868d
Use "non-zero" consistently
2024-01-06 12:07:55 +11:00
Nulano
90991428fa
add LCMS2 flags to ImageCms
2024-01-01 21:40:38 +01: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
Andrew Murray
f8df5303fa
Merge pull request #7672 from nulano/imagefont-negative-crop
...
Trim negative glyph offsets in ImageFont.getmask()
2024-01-01 23:34:17 +11:00
Nulano
0eb661b889
do not crop ImageFont glyphs from negative coordinates
2024-01-01 11:35:42 +01:00
Andrew Murray
57096f55cf
Merge pull request #7642 from nulano/types-util
...
Add type hints to _util
2024-01-01 21:27:57 +11:00
Andrew Murray
10c2df5430
Merge pull request #7669 from radarhere/imagefont_mask
...
Do not try and crop glyphs from outside of source ImageFont image
2024-01-01 18:16:49 +11:00
Andrew Murray
4f17b60088
Merge pull request #7667 from nulano/iptc
...
Fix loading IPTC images and update test
2024-01-01 16:25:29 +11:00
Andrew Murray
ecd3948b45
Test PILfont even when FreeType is supported
2024-01-01 16:13:57 +11:00
Andrew Murray
d6fd4c978e
Merge pull request #7666 from hugovk/coverage-exclude_also
...
Coverage: add more exclusions
2024-01-01 15:46:52 +11:00
Andrew Murray
3ef7b93846
Merge branch 'main' into iptc
2024-01-01 15:23:08 +11:00
Andrew Murray
f2c6f118aa
Merge pull request #7664 from nulano/deprecate-iptc-helpers
...
Deprecate IptcImagePlugin helpers
2024-01-01 15:22:18 +11:00
Andrew Murray
99760f4c59
Merge branch 'main' into tiff
2024-01-01 13:41:17 +11:00
Hugo van Kemenade
d26880cda9
Remove unused create_lut()
2023-12-31 20:06:40 +02:00
Nulano
fa4b3776f0
deprecate IptcImagePlugin.{dump,i,PAD}
2023-12-31 17:41:13 +02:00
Hugo van Kemenade
6c4b47dc46
Merge pull request #7496 from radarhere/exif
2023-12-31 17:39:21 +02:00
Hugo van Kemenade
da61ed1330
Merge pull request #7661 from radarhere/iptc
2023-12-31 17:38:35 +02:00
Hugo van Kemenade
d71cf168ee
Merge pull request #7566 from radarhere/exit
2023-12-31 17:37:43 +02:00
Hugo van Kemenade
119885aa66
Merge pull request #7589 from radarhere/dds_rgb
2023-12-31 17:35:30 +02:00
Hugo van Kemenade
5df7235d90
Merge pull request #7654 from radarhere/rowsperstrip
2023-12-31 17:29:26 +02:00
Ondrej Baranovič
b1e88ac17f
omit default color value
...
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2023-12-31 14:49:48 +01:00
Nulano
46a6ddf0c2
fix loading IPTC images and add test
2023-12-31 13:53:09 +01:00
Andrew Murray
2ec53e36e9
Apply ImageFont.MAX_STRING_LENGTH to ImageFont.getmask()
2023-12-31 23:17:28 +11:00
Andrew Murray
1d9c931626
Changed tile tuple to match other plugins
2023-12-31 22:43:08 +11:00
Andrew Murray
557ba59d13
Include further builtins
2023-12-30 09:30:12 +11:00
Andrew Murray
0ca3c33c59
Allow ops
2023-12-30 09:29:40 +11:00
Hugo van Kemenade
2de26d0dae
Merge pull request #7647 from radarhere/imagefont
2023-12-29 23:05:05 +02:00
Andrew Murray
f7ec665bf1
Support setting ROWSPERSTRIP tag
2023-12-29 23:00:14 +11:00
Andrew Murray
f6bcf4e1ae
Use IMAGEWIDTH and IMAGELENGTH when calculating strip size
2023-12-29 14:15:40 +11:00
Andrew Murray
a5e42107ea
Removed __future__ import from fuzz_font and fuzz_pillow
2023-12-29 11:23:34 +11:00
Benjamin Gilbert
372083c59f
Check similarity of round-tripped YCbCr JPEG, for symmetry with RGB
2023-12-28 13:00:17 -06:00
Andrew Murray
a16974e240
Restored testing of ImageFont class
2023-12-28 21:07:16 +11:00
Nulano
90d5552800
use _util.DeferredError.new everywhere
2023-12-27 14:55:30 +01:00
Andrew Murray
f6f3dab672
Import UnidentifiedImageError directly
2023-12-27 17:42:17 +11:00
Andrew Murray
6e97dd5cec
Raise ValueError when trying to save without bitmap
2023-12-27 12:32:35 +11: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
Andrew Murray
7b9d101533
Moved __future__ import to beginning of file
2023-12-26 16:47:06 +11:00
Andrew Murray
6768d3aa91
Merge pull request #7497 from ZachNagengast/fix-alpha-for-overlapping-glyphs
...
Fix incorrect color blending for overlapping glyphs in BGRA mode
2023-12-24 19:03:28 +11:00
Hugo van Kemenade
43b2f61e79
Add 'from __future__ import annotations' using Ruff/isort
2023-12-21 13:13:31 +02:00
Hugo van Kemenade
18907b5f7e
Merge pull request #7568 from radarhere/gif_transparency
2023-12-21 12:58:07 +02:00
Hugo van Kemenade
9eb93915c3
Merge pull request #7521 from radarhere/gif_save_all
2023-12-21 12:52:26 +02:00
Hugo van Kemenade
ccfe33fd3a
Merge pull request #7515 from radarhere/gif
2023-12-21 12:51:20 +02:00
Hugo van Kemenade
7e30619541
Merge pull request #7483 from radarhere/psd
2023-12-21 12:50:34 +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
Benjamin Gilbert
e1fb1ab5c4
Deprecate raise_oserror() for removal in Pillow 12
...
It's only useful if the caller has an IMAGING_CODEC_* error code, which
are only produced by codec decode() methods and are automatically
translated by ImageFile.
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2023-12-13 02:17:32 -06:00
Andrew Murray
8b44116773
Merge branch 'main' into dds_rgb
2023-12-07 08:43:57 +11:00
Hugo van Kemenade
7cc0482804
Merge pull request #6486 from REDxEYE/improved_dds
2023-12-06 22:51:05 +02:00
Andrew Murray
e43dd6610d
Merge pull request #7578 from radarhere/font
...
Handle pathlib.Path in FreeTypeFont
2023-12-06 12:09:16 +11:00
Andrew Murray
0a66b98558
Merge pull request #7597 from hugovk/comprehensions
...
Use list comprehensions to create transformed lists
2023-12-05 18:56:49 +11:00
Andrew Murray
f2e478e968
Merge branch 'main' into improved_dds
2023-12-05 17:49:47 +11:00
Andrew Murray
0e36c14680
Added test BC4 TYPELESS image
2023-12-05 07:39:15 +11:00
Andrew Murray
c1b3c34678
Added expected test image
2023-12-05 07:18:07 +11:00
Sam Bourne
8c5d5c7e6b
Add support for BC4 dds files
2023-12-04 09:54:10 -08:00
Andrew Murray
9a6c47a9d2
Merge branch 'main' into font
2023-12-04 22:25:58 +11:00
Hugo van Kemenade
27d7bd10c8
Use list comprehensions to create transformed lists
2023-12-03 21:59:44 +02:00
Andrew Murray
2eddbc5994
Updated docstrings
2023-12-03 14:25:07 +11:00
Andrew Murray
ab96324c12
Removed support for RGB bitcount 8
2023-12-02 21:36:17 +11:00
Andrew Murray
49578f0059
Merge branch 'main' into improved_dds
2023-12-02 21:35:20 +11:00
Andrew Murray
a6a612c6c5
Merge branch 'main' into fix-alpha-for-overlapping-glyphs
2023-12-02 21:33:29 +11:00
Zach Nagengast
e80002643d
Update Tests/test_imagefont.py
...
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2023-12-01 08:54:13 -08:00
Hugo van Kemenade
76446ee450
Merge pull request #7524 from cclauss/ruff-rules-C4-PERF102-PIE810-PLR
2023-12-01 17:09:25 +02:00
Andrew Murray
316f39702c
Merge pull request #7580 from nulano/cibuildwheel-docker
...
Build Windows wheels using cibuildwheel
2023-12-01 10:41:53 +11:00
Nulano
e1059767d8
replace importlib.util.find_spec with try import except ImportError
2023-11-30 20:11:24 +01:00
Andrew Murray
f1fef09d4a
Support arbitrary masks for uncompressed RGB images
2023-11-30 21:13:59 +11:00
Aarni Koskela
36e0b5312a
Update Tests/test_imagefont.py
...
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2023-11-29 09:21:51 +02:00
Ondrej Baranovič
6fe42bddd9
Apply suggestions from code review
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-11-28 14:20:57 +01:00
nulano
1fdb0668d8
test cibuildwheel wheels in Docker on Windows
2023-11-28 14:20:57 +01:00
Aarni Koskela
39ec56c6ea
Improve error message when creating TrueType fonts of invalid size
...
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2023-11-28 15:09:53 +02:00
Nulano
0cef9f251c
fix drawing text alpha on RGBA image on big-endian platforms
2023-11-27 17:12:12 +01:00
Nulano
f3b3442c50
add test for glyph alpha blending
2023-11-27 16:25:04 +01:00
Andrew Murray
ae7958fa8d
Handle pathlib.Path in FreeTypeFont
2023-11-27 23:03:10 +11:00
Andrew Murray
55c5587437
Fill identical pixels with transparency in subsequent frames
2023-11-25 19:16:32 +11:00
Andrew Murray
5431b15bd2
Do not assign new fp attribute to image when exiting context manager
2023-11-24 15:19:19 +11:00
Andrew Murray
5f33175b20
Fixed checking that no debug messages were logged
2023-11-17 08:37:46 +11:00
Andrew Murray
67e1253202
Do not assign new fp attribute to image when closing
2023-11-17 08:32:25 +11:00
Raphael Vieira Rossi
b25ece364b
fix: check object Image has attribute 'fp' when closes
2023-11-16 16:46:11 -03: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
Hugo van Kemenade
902055fbfe
Merge pull request #7526 from akx/mount-ruffmore
2023-11-13 16:15:06 +02:00
Hugo van Kemenade
5eea6ed633
Replace 'assert False' with pytest.fail()
2023-11-12 22:30:28 +02:00