Commit Graph

1112 Commits

Author SHA1 Message Date
nulano
e65dd04a63 avoid using pkg_resources in PIL.features.pilinfo 2020-10-13 17:52:26 +01:00
Hugo van Kemenade
9a93f6ee45
Merge pull request #4959 from nulano/anchor-part3 2020-10-12 19:27:08 +03:00
Hugo van Kemenade
c7b0fe1bca
Merge pull request #4963 from nulano/implicit-function 2020-10-12 19:23:40 +03:00
nulano
d7a08cbd15 add color support to new text measuring functions 2020-10-12 16:05:19 +01:00
nulano
90e8255ba4 Merge remote-tracking branch 'upstream/master' into anchor-part3
# Conflicts:
#	Tests/test_imagefontctl.py
2020-10-12 15:50:45 +01:00
Hugo van Kemenade
43c3f4de80
Merge pull request #4955 from nulano/ft-color3 2020-10-12 13:52:01 +03:00
Andrew Murray
518b783c64 Removed OSError in favour of DecompressionBombError 2020-10-12 19:32:48 +11:00
nulano
40c9a5a2a0 compatibility for LCMS<2.7, vix LCMS version string 2020-10-12 02:58:24 +01:00
nulano
067a254366
Apply suggestions from code review
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-10-11 21:55:32 +02:00
Hugo van Kemenade
15c339470d
Merge pull request #4523 from xtsm/ellipse
Implemented another ellipse drawing algorithm
2020-10-11 18:04:34 +03:00
nulano
9b5931f212
typo
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2020-10-09 16:43:10 +02:00
nulano
c80f123923 document ImageDraw.textlength and ImageDraw.textbbox 2020-10-09 01:43:23 +01:00
nulano
1551e120ae add textlength and textbbox to ImageDraw 2020-10-09 01:02:51 +01:00
nulano
395aa946a9 add getbbox and getlength, with tests
Squashed commits:

[ec9ec31b] add tests for invalid anchor
(cherry picked from commit 9e50a6a47f79876ee56942152047f03fff03c49b)

[386a9170] fix lint and docs
(cherry picked from commit 2d0d5282fcfc3ee332a41e60b865ee766445cc3d)

[29f5d4c9] restore and document previous getsize behaviour
see discussion in issue 4789
(cherry picked from commit 9fbc94571ce0ed42fdd11e99f343a1613c9dc6d3)

[0ffd51a0] add getbbox and getlength, with tests
(cherry picked from commit c5f63737476a998c81e589e5819d21ca69bb7b46)
2020-10-09 00:56:58 +01:00
Andrew Murray
ddbd529573 Corrected comment 2020-10-09 01:16:23 +11:00
Andrew Murray
88f9ef2f6b Removed unused function 2020-10-09 01:16:23 +11:00
nulano
82a28d12e2 add support for fonts with COLR data 2020-10-07 05:29:10 +01:00
Hugo van Kemenade
a7f384a813
Merge pull request #4292 from radarhere/private_png_chunks
Added reading and writing of private PNG chunks
2020-10-05 23:49:09 +03:00
Hugo van Kemenade
b29cab08d3
Merge pull request #4930 from nulano/anchor-part2 2020-10-05 20:19:33 +03:00
Andrew Murray
7a1f0f6a8f Fixed bug in Exif __delitem__ 2020-10-05 09:45:05 +11:00
nulano
a9b8dcba7d write anchor docs
(cherry picked from commit dcaee36941e6cb5e6f93186b6f819fb74887e0d3)
2020-09-22 14:58:17 +02:00
nulano
e6d4c2ce8f implement text anchor for truetype fonts
(cherry picked from commit bac9025918ccf944bac77addc130f33cf9d74701)
2020-09-19 15:17:45 +02:00
Hugo van Kemenade
93d011efb5
Merge pull request #4910 from nulano/anchor-part1 2020-09-19 13:41:15 +03:00
Andrew Murray
c196af6ddb Fixed loading profile with non-ASCII path on Windows 2020-09-13 13:53:58 +10:00
Andrew Murray
2e029d9a79
Merge pull request #4840 from essarrjay/patch-1
Image.thumbnail docstring: added missing filters
2020-09-12 11:03:56 +10:00
nulano
a501ba9308 update link in comment 2020-09-11 01:14:00 +02:00
nulano
54e067779b fix and add tests
(cherry picked from commit 0b711f10d0490863976699c051f2027b6799d501) (+1 squashed commits)

Squashed commits:

[9d4e6c17] fix tests
2020-09-09 02:12:21 +02:00
Andrew Murray
fac2d2781e
Merge pull request #4837 from nulano/formats
Add formats parameter to open
2020-09-05 20:49:59 +10:00
Hugo van Kemenade
3dba4ee10a
Merge pull request #4846 from comhar/features/compute_polygon_coordinates 2020-09-04 23:28:43 +03:00
nulano
a340dc5fd3 Merge remote-tracking branch 'upstream/master' into formats 2020-09-04 21:07:34 +02:00
Hugo van Kemenade
128261fdbb
Merge branch 'master' into bytes-warning 2020-09-03 18:31:03 +03:00
Hugo van Kemenade
ddc4c64664
Merge branch 'master' into rm-3.5 2020-09-02 20:36:30 +03:00
Hugo van Kemenade
9f1f63a46b
Merge pull request #4862 from radarhere/subifds 2020-09-02 16:58:55 +03:00
Hugo van Kemenade
e0eec1eb56 Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
Andrew Murray
ca43774d40 Corrected comment layout
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-08-31 18:50:15 +10:00
Andrew Murray
298b7d0333 Update pre-commit 2020-08-31 18:50:15 +10:00
Andrew Murray
0a46cbfea9 Reverted NaN change, so that NaN != NaN 2020-08-28 20:55:47 +10:00
luphord
78e971913c fix IFDRational equality 2020-08-28 20:47:16 +10:00
Andrew Murray
f9f492b2b1 Added HAMMING to thumbnail docstring [ci skip] 2020-08-27 19:55:24 +10:00
Guillaume Ayoub
45b228e835 Fix exception handling when saving images
The e variable is already used in the for loop, use exc to store the exception.
2020-08-24 21:32:21 +10:00
Hugo van Kemenade
855a28e544
Merge pull request #4866 from radarhere/cmyk_pdf
Corrected inverted PDF CMYK colors
2020-08-23 14:38:06 +03:00
Hugo van Kemenade
27d34d2f13
Merge pull request #4823 from radarhere/close
Do not try to close file pointer if file pointer is empty
2020-08-23 14:26:11 +03:00
Tommy C
b142560488 Rename b_circle and bounding_circle + accept ((x0, y0), r)
Summary of changes

- Rename `b_circle` and `bounding_circle`
-`bounding_circle` now accepts both formats below:
    - (x0, y0, r)
    - ((x0, y0), r)
2020-08-22 20:19:23 +01:00
Tommy C
df9329f9f0 Replace bbox with b_circle, kwargs with args + minor tweaks
Summary of changes:
 - `ImageDraw.regular_polygon` now accepts a bounding circle which
inscribes the polygon. A bounding circle is defined by a center point
(x0, y0) and a radius. A bounding box is no longer accepted.
 - All keyword args have been replaced with positional args.

Misc
- Test image file renaming, minor variable name changes
2020-08-20 20:46:11 +01:00
Tommy C
ac7d41545d Update regular_polygon args + arg checks
Summary of changes

- Allow positional args in `regular_polygon` method
- Allow multiple bounding box formats
    - (e.g. bbox = [(x0, y0), (x1, y1)] or [x0, y0, x1, y1])
- Check if bounding box is square
- Update var names
    - b_box => bbox
    - nb_sides => n_sides
2020-08-16 21:07:16 +01:00
Tommy C
0ed01dd964 Add ImageDraw.regular_polygon 2020-08-16 13:29:13 +01:00
Andrew Murray
70d868ef59
Lint fix
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-08-15 13:56:51 +10:00
Andrew Murray
14af7bb5ac Do not try to close fp if fp is empty 2020-08-15 13:07:14 +10:00
Andrew Murray
a2597a5683 Corrected inverted CMYK colors 2020-08-14 21:12:01 +10:00
Hugo van Kemenade
ef986e376f
Merge branch 'master' into master 2020-08-13 23:58:42 +03:00