Varun Chawla
f708c00527
Fix UnboundLocalError in _border for invalid tuple lengths and document rgba() color format
...
The _border helper in ImageOps raised UnboundLocalError when given a tuple
with a length other than 2 or 4 (e.g. 1-tuple or 3-tuple). This changes
it to raise a clear ValueError instead.
Also adds documentation for the rgba() color format in ImageColor, which
was supported in code and tested but missing from the docs.
2026-02-13 19:38:48 -08:00
Andrew Murray
2ebb3e9964
Use different variables for Image and ImageFile instances ( #9316 )
2025-12-28 23:09:46 +02:00
Andrew Murray
51e3fe45bf
Use different variables for Image and ImageFile instances
2025-10-20 19:18:00 +11:00
Andrew Murray
35c92308ad
Allow RGBA palettes to work with expand()
2025-08-06 11:41:26 +10:00
Andrew Murray
4161bb1645
Corrected error when XMP is tuple
2025-03-03 19:10:55 +11:00
Andrew Murray
ce1996d804
Use getpixel() instead of load()
2025-02-03 19:32:59 +11:00
Andrew Murray
d12e78badf
Removed exif_transpose return type checks
2025-01-03 01:00:19 +01:00
Aleksandr Karpinskii
a3468996c0
Remove webp animations flags and conditions
...
Removed:
_webp.WebPDecode
_webp.HAVE_WEBPANIM
features.webp_anim
2024-08-13 09:33:20 +04:00
Andrew Murray
4aa24f88d9
Added type hints to tests ( #8203 )
...
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2024-07-05 11:56:24 -06:00
Andrew Murray
267c0b37b1
Added type hints
2024-07-02 20:10:47 +10:00
Andrew Murray
304cf484aa
Do not presume "xmp" info simply because "XML:com.adobe.xmp" info exists
2024-06-27 13:29:22 +10:00
Andrew Murray
1a14957c19
Added type hints
2024-06-09 15:16:17 +10:00
Andrew Murray
6d78d42769
Added type hints
2024-03-02 13:12:17 +11:00
Andrew Murray
5ff7d926fd
Added type hints
2024-02-17 15:00:38 +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
Hugo van Kemenade
43b2f61e79
Add 'from __future__ import annotations' using Ruff/isort
2023-12-21 13:13:31 +02:00
Andrew Murray
f54dd84586
Test unsupported autocontrast mode
2023-10-24 12:44:00 +11:00
Andrew Murray
80dbd3b193
Added ImageOps cover method
2023-09-21 11:54:36 +10:00
Andrew Murray
7d97fa8b86
Use snake case
2023-06-14 16:12:47 +10:00
Andrew Murray
8d3014b8bf
Added inPlace argument to exif_transpose()
2023-04-15 21:03:59 +10: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
b3e847a164
Merge branch 'main' into fix-padding
2022-09-21 20:22:27 +10:00
Andrew Murray
3c42b270b9
Copy palette in expand() for PA
2022-09-19 21:39:38 +10:00
Andrew Murray
279ddf4ce6
Use getpalette() in ImageOps
2022-09-19 21:34:29 +10:00
Andrew Murray
f9d3ee0f48
Round position in pad()
2022-08-24 22:56:19 +10:00
Andrew Murray
df4bb34600
Added test
2022-08-24 22:32:42 +10:00
Andrew Murray
bac83f7dd3
Check that orientation is still absent after reloading Exif
2022-07-27 22:27:43 +10:00
Andrew Murray
7e1261c6a0
Simplified test code
2022-07-27 22:18:39 +10:00
Alexander Piskun
db20d0f8fe
fixing typo in filetest name
2022-07-26 00:45:23 +03:00
Alexander Piskun
6e97da0260
fixing xmp tag orientation generated by exiftool
2022-07-26 00:30:32 +03:00
Andrew Murray
ecb64fe210
Allow 1 mode images to be inverted
2022-02-08 09:12:01 +11:00
Andrew Murray
0a7af10827
Instead of drawing border, calculate palette index before image creation in expand()
2021-07-16 20:58:32 +10:00
Andrew Murray
917a598615
Handle removing orientation from alternate types of EXIF data
2021-07-06 10:37:28 +10:00
Andrew Murray
3e5ceb6d67
Corrected border position
2021-06-29 21:24:41 +10:00
Andrew Murray
b6b362c807
Set color after attaching palette in expand()
2021-06-23 19:28:56 +10:00
Hugo van Kemenade
e5b2d61e00
Merge pull request #5551 from radarhere/imageops
2021-06-20 15:51:21 +03:00
Andrew Murray
6639b2af7f
Copy palette to new images in expand
2021-06-19 21:24:58 +10:00
Andrew Murray
04566917f8
Do not modify EXIF of original image instance in exif_transpose()
2021-06-18 19:01:12 +10:00
Andrew Murray
d22fe41776
Reorganised test to use parametrize
2021-05-01 22:36:12 +10:00
Andrew Murray
40eceec70d
Added contain method
2021-04-19 20:12:52 +10:00
Andrew Murray
7844c6e483
Test that preserve_tone changes RGB images but not L images
2021-03-29 23:26:34 +11:00
German Novikov
d18e55013d
Update Tests/test_imageops.py
...
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2021-03-28 15:02:52 +03:00
German Novikov
977e64fb61
Update Tests/test_imageops.py
...
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2021-03-25 14:56:30 +03:00
elejke
694d70bdc3
fixed typos in test for autocolor tone preserving
2021-03-23 13:09:51 +03:00
Andrew Murray
4a0698838d
Parametrized test
2021-03-23 20:08:18 +11:00
elejke
8913166c7e
fix test function name for autocontrast
2021-03-23 11:59:37 +03:00
elejke
f73d238cd2
removed redundant comments in tests for tone preserving autocolor
2021-03-22 15:30:43 +03:00
German Novikov
25403063ea
Update Tests/test_imageops.py
...
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2021-03-22 15:27:13 +03:00
elejke
b4e5a6d202
add more tests for autocontrast preserve tone option
2021-03-22 12:06:44 +03:00