nulano
f2b2d53ca8
raqm: avoid declaring variables in for statement for C89 compatibility
2021-01-05 00:07:03 +11:00
nulano
c3fce854f2
avoid NULL in fribidi shim
2021-01-05 00:07:03 +11:00
nulano
be0d0a3a48
fix finding raqm deps
2021-01-05 00:07:03 +11:00
nulano
3386a9ce02
replace tabs in thirdparty libs
2021-01-05 00:06:29 +11:00
nulano
5cd688fc82
add option to statically link fribidi, version info
2021-01-05 00:06:29 +11:00
nulano
9e5fc136b9
add Raqm license and readme
2021-01-05 00:03:52 +11:00
nulano
8bc1ff35b4
use FriBiDi shim in Raqm
2021-01-05 00:03:52 +11:00
nulano
e5e5761da4
add raqm to thirdparty directory
2021-01-04 23:57:31 +11:00
Andrew Murray
46b7e86bab
Format with ClangFormat
2021-01-03 14:17:51 +11:00
Andrew Murray
56e7d1fd9b
8.2.0.dev0 version bump
2021-01-03 07:14:59 +11:00
Andrew Murray
fcc42e0d34
8.1.0 version bump
2021-01-02 22:39:02 +11:00
Andrew Murray
c8dd1c8422
Merge pull request #5175 from radarhere/tiff
...
Fix TIFF OOB Write error
2021-01-02 21:13:28 +11:00
Andrew Murray
0117694533
Merge pull request #5174 from radarhere/pcx
...
Fix for Read Overflow in PCX Decoding
2021-01-02 21:00:25 +11:00
Eric Soroos
2f409261eb
Fix for CVE CVE-2020-35655 - Read Overflow in PCX Decoding.
...
* Don't trust the image to specify a buffer size
2021-01-02 20:38:46 +11:00
wiredfool
45a62e91b1
Rework ReadTile
...
* Don't malloc for the swap line, just shuffle backwards
* Ensure that im->pixelsize is sanity checked
* Ensure that we're using the right size for the buffer from TiffReadRGBATile
2021-01-02 20:37:48 +11:00
wiredfool
eb8c1206d6
Fix CVE-2020-35654 - OOB Write in TiffDecode.c
...
* In some circumstances with some versions of libtiff (4.1.0+), there
could be a 4 byte out of bound write when decoding a YCbCr tiff.
* The Pillow code dates to 6.0.0
* Found and reported through Tidelift
2021-01-02 20:37:48 +11:00
Eric Soroos
9a2c9f722f
Make the SGI code return -1 as an error flag, error in state
2021-01-02 20:10:02 +11:00
Eric Soroos
7e95c63fa7
Fix for SGI Decode buffer overrun CVE-2020-35655
...
* Independently found by a contributor and sent to Tidelift, and by Google's OSS Fuzz.
2021-01-02 20:09:58 +11:00
Hugo van Kemenade
07bbc46589
Merge pull request #5149 from wiredfool/gif_write_oob_read
2021-01-02 10:14:17 +02:00
Hugo van Kemenade
4e3dc9a06b
Add support for PySide6
2021-01-01 20:34:44 +02:00
Andrew Murray
6175389186
Only read different sizes for "Large Thumbnail" frames
2021-01-01 12:45:02 +11:00
Hugo van Kemenade
4093897673
Merge pull request #5126 from radarhere/apng_disposal
...
Use disposal settings from previous frame in APNG
2020-12-31 16:06:33 +02:00
Andrew Murray
01cee38b9b
Merge pull request #5153 from radarhere/tiff_wheels
...
Updated libtiff to 4.2.0
2020-12-31 10:01:19 +11:00
Eric Soroos
250e42f7f8
Bad Rebase
2020-12-30 11:07:58 +01: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
Andrew Murray
6b21a96578
Changed readcount so that _TIFFSetGetType can identify the type
2020-12-30 11:57:05 +11:00
Hugo van Kemenade
85d61ca7d5
Merge pull request #5139 from radarhere/repr_png
...
Added exception explaining that _repr_png_ saves to PNG
2020-12-29 12:43:22 +02:00
Hugo van Kemenade
cd446e6088
Merge pull request #5125 from radarhere/disposal_method
...
Use previous disposal method in GIF load_end
2020-12-29 12:26:14 +02:00
Hugo van Kemenade
5c64438792
Merge pull request #5090 from radarhere/valueerror
...
Do not catch a ValueError only to raise another
2020-12-29 12:19:16 +02:00
Hugo van Kemenade
25500e83bc
Merge pull request #5089 from radarhere/putpalette_rgba
...
Allow putpalette to accept 1024 integers to include alpha values
2020-12-29 12:17:50 +02:00
Eric Soroos
a39d7c4fcf
Fix OOB Read in tif_dirinfo.c
...
==3330== at 0xBD4110C: _TIFFSetupFields (tif_dirinfo.c:327)
Passing in a stack allocated array is going to fail, as a reference
is retained to the name and used later when flushing the Tiff to
the file.
2020-12-28 15:00:48 +01:00
Eric Soroos
d96945b7c8
Fix Out of bounds read when saving GIF of xsize=1
2020-12-27 16:01:26 +01:00
Andrew Murray
00df94bb78
Removed unused variable
2020-12-27 16:16:55 +11:00
Andrew Murray
fdce845364
Added exception explaining that _repr_png_ saves to PNG
2020-12-27 15:36:16 +11:00
Andrew Murray
cf530b8d9c
Merge pull request #5111 from cgohlke/patch-3
...
Fix dereferencing of potential null pointers
2020-12-27 12:21:09 +11:00
Andrew Murray
51b8137924
Changed style for consistency
2020-12-26 21:49:40 +11:00
Hugo van Kemenade
2635a4859d
Merge pull request #5127 from radarhere/warnings
...
Fixed warnings assigning to "unsigned char *" from "char *"
2020-12-24 10:50:24 +02:00
Andrew Murray
e37a8a263d
Merge pull request #4568 from ziplantil/ico-append-images
...
Add append_images support for ICO
2020-12-24 11:10:33 +11:00
Andrew Murray
8eaf9e7cb7
Fixed warning assigning to "unsigned char *" from "char *"
2020-12-24 10:47:06 +11:00
Andrew Murray
5e4e0fa6ee
Use disposal settings from previous frame
2020-12-24 09:55:22 +11:00
Andrew Murray
9940c84b08
Use previous disposal method in load_end
2020-12-23 13:22:53 +11:00
Andrew Murray
36dc83e3ac
Fixed comparison between unsigned int and int
2020-12-22 16:07:32 +11:00
Andrew Murray
26e5929617
Fixed comparison between int and unsigned long
2020-12-22 16:06:44 +11:00
Andrew Murray
8794610c76
Block TIFFTAG_SUBIFD
2020-12-22 11:38:02 +11:00
Andrew Murray
0eddc82157
Merge pull request #5108 from cgohlke/patch-1
...
Fix dereferencing potential null pointer
2020-12-22 08:26:48 +11:00
Hugo van Kemenade
396b329507
Merge pull request #5113 from radarhere/memory
...
Replaced PyErr_NoMemory with ImagingError_MemoryError
2020-12-20 22:17:10 +02:00
Christoph Gohlke
d1e706d756
return ImagingError_MemoryError
2020-12-19 19:42:29 -08:00
Christoph Gohlke
fd14616dbb
Return ImagingError_MemoryError
2020-12-19 19:37:05 -08:00
Christoph Gohlke
15dd7aef9f
Return ImagingError_MemoryError
2020-12-19 19:35:21 -08:00
Andrew Murray
83d82ae150
Merge pull request #5098 from hugovk/deprecate-freetype
...
Deprecate FreeType 2.7
2020-12-20 13:35:41 +11:00
Andrew Murray
b7fb39fff8
Use ImagingError_MemoryError NULL return value
2020-12-20 13:00:16 +11:00
Andrew Murray
75542fea6d
Replaced PyErr_NoMemory with ImagingError_MemoryError
2020-12-20 13:00:10 +11:00
Christoph Gohlke
fd4b0609ef
Fix dereferencing of potential null pointers
2020-12-19 15:58:25 -08:00
Christoph Gohlke
c1adae6f70
Remove duplicate code
2020-12-19 15:07:51 -08:00
Christoph Gohlke
7673cb7549
Fix dereferencing potential null pointer
2020-12-19 14:57:55 -08:00
Andrew Murray
043d8dac0b
Do not require packaging just for a DeprecationWarning
2020-12-18 23:42:16 +11:00
Hugo van Kemenade
27bf17009c
Deprecate FreeType 2.7, to be removed in Pillow 9 (2022-01-02)
2020-12-17 10:28:06 +02:00
Andrew Murray
ff0ad9af34
Do not catch a ValueError only to raise another
2020-12-12 23:36:57 +11:00
Andrew Murray
a666c91e10
Allow putpalette to accept 1024 integers to include alpha values
2020-12-12 14:12:30 +11:00
Hugo van Kemenade
0893f502c3
Document when deprecations will be removed [CI skip]
2020-12-10 14:32:43 +02:00
Hugo van Kemenade
2b87ccae89
Merge pull request #5026 from radarhere/unused
...
Removed unused C methods
2020-11-18 14:46:36 +02:00
Andrew Murray
4f0b9185a3
Fixed link formatting
2020-11-14 08:41:44 +11:00
Andrew Murray
7e2015c75f
init() if one of the formats is unrecognised
2020-11-11 21:05:57 +11:00
Andrew Murray
2ae597c357
Renamed variable to match IcnsImagePlugin
2020-11-04 22:42:53 +11:00
Andrew Murray
8593e17b05
Removed unused methods
2020-11-02 20:58:51 +11:00
Andrew Murray
732bf12fd6
Merge branch 'master' into 3.10
2020-10-31 15:16:46 +11:00
Hugo van Kemenade
b074d87179
Merge pull request #4760 from qiankanglai/dds-rgba8888
...
Support raw rgba8888 for dds
2020-10-15 08:10:01 +03:00
nulano
26cfe04fea
fix PY_SSIZE_T_CLEAN in display.c
2020-10-14 21:12:00 +01:00
Hugo van Kemenade
7a20ef7818
8.1.0.dev0 version bump
2020-10-14 21:23:45 +03:00
Hugo van Kemenade
235a7d6d7d
8.0.0 version bump
2020-10-14 19:02:53 +03:00
Hugo van Kemenade
1cb3e2f742
Merge pull request #4918 from gofr/4825-jpeg-16-bit-qt
2020-10-14 17:58:12 +03:00
Hugo van Kemenade
04f1b38fd1
Merge pull request #4979 from radarhere/ifd
...
Added reading of IFD tag type
2020-10-14 17:43:41 +03:00
Hugo van Kemenade
14643d5746
Merge pull request #4806 from nqbit/msan_bug
...
Initialize offset memory for PyImagingPhotoPut
2020-10-14 17:38:17 +03:00
Hugo van Kemenade
e58baa0c09
Merge pull request #4756 from nulano/warn-tiff
...
Fix TiffDecode comparison warnings
2020-10-14 17:33:05 +03:00
Hugo van Kemenade
2c0aa5d0b8
Merge pull request #4923 from ax3l/fix-imagingHinclude
2020-10-14 16:33:42 +03:00
Andrew Murray
1a3367400c
Added reading of IFD tag type
2020-10-14 23:37:54 +11:00
Hugo van Kemenade
f9852c0381
Merge branch 'master' into fix-imagingHinclude
2020-10-14 14:50:36 +03:00
Axel Huebl
115add2fa0
do not add extra include directories ( #3 )
...
Co-authored-by: nulano <nulano@nulano.eu>
2020-10-14 01:59:34 -07:00
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
b49ebad5f5
Merge remote-tracking branch 'upstream/master' into anchor-part3
2020-10-12 16:14:00 +01:00
nulano
d7a08cbd15
add color support to new text measuring functions
2020-10-12 16:05:19 +01:00
Hugo van Kemenade
c1a9f889f3
Merge pull request #4964 from nulano/pypy
2020-10-12 17:59:55 +03: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
309cb9e5c4
Merge pull request #4927 from radarhere/tuple
2020-10-12 14:40:22 +03: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
c06bb8044d
remove PyPy3-7.1.x compatibility code
2020-10-12 02:08:50 +01:00
nulano
39ae5d62f0
compatibility code for ancient FreeType
2020-10-12 01:45:52 +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
gofr
b212a1eb8f
Keep baseline compatibility when specifying quality
...
16-bit quantization tables can appear at quality values below
about 25. These may cause compatibility problems. Maintain
baseline compatibility and avoid confusing users with warning
messages.
2020-10-10 16:23:58 +02: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
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
568a1260fc
fix color on big-endian
2020-10-07 13:03:05 +01:00
nulano
bf529303de
use FT_Bitmap_Convert instead of reimplementing the wheel
2020-10-07 05:29:18 +01:00
nulano
9151da162c
add support for CBDT and embedded bitmaps in truetype fonts
2020-10-07 05:29:17 +01:00
nulano
82a28d12e2
add support for fonts with COLR data
2020-10-07 05:29:10 +01:00
Hugo van Kemenade
c841501c34
Merge pull request #4752 from radarhere/warnings
...
Fixed comparison warnings
2020-10-05 23:49:54 +03: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
3273a1af4c
fix tk on latest msys2-mingw64
2020-10-04 22:55:53 +01:00
Andrew Murray
ac1e86b9d4
Prefix header include
2020-09-29 19:54:57 +10:00
nulano
a9b8dcba7d
write anchor docs
...
(cherry picked from commit dcaee36941e6cb5e6f93186b6f819fb74887e0d3)
2020-09-22 14:58:17 +02:00
Andrew Murray
7e4db0a80e
Prefix other header includes
2020-09-22 13:33:05 +10:00
Andrew Murray
e01081bf8b
Improved error message
...
Co-authored-by: nulano <nulano@nulano.eu>
2020-09-22 08:36:29 +10:00
Andrew Murray
27c0747518
Allow tuples with one item to give single color value in getink
2020-09-20 14:23:05 +10: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
Axel Huebl
f79379ed7c
Imaging.h: confusion with system
...
The file `libImaging/Imaging.h` gets installed flat on
Ubuntus into the public Python includes.
When building a newer version of Pillow from source and
hinting the Python includes "too early" in includes, e.g.
in package managers, this can confuse the two files and
pick up the external file over the internal one. With
different versions, this mismatch can lead to build errors,
e.g. undefined macros.
The most robust way to avoid this is to pre-fix the internal
include accordingly, so that the relative path to the including
file has to match as well.
2020-09-17 18:06:45 +10: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
Stanislau T
17d83d6a7c
Fix comment grammar
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-09-11 19:51:57 +03:00
nulano
a501ba9308
update link in comment
2020-09-11 01:14:00 +02:00
Hugo van Kemenade
68da661db9
Small optimisation: move distance==0 comparison to outer loop, to check once per call instead of once per pixel
2020-09-09 10:08:46 +03:00
nulano
ee1cc6ad7c
remove use of FT_Set_Transform
2020-09-09 02:14:49 +02:00
nulano
5d541e3d9e
simplify code, organize variable declarations, add comments
2020-09-09 02:14:46 +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
c83ffc6aea
Fixed effect_spread bug for zero distance
2020-09-08 18:51:58 +10: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
63d8a600cb
Merge pull request #4890 from nulano/mingw-setup
2020-09-03 21:11:39 +03:00
Hugo van Kemenade
799fa9764f
Merge pull request #4882 from nulano/putpixel
2020-09-03 19:22:30 +03: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
nulano
ea582a19e3
fix basic layout
...
(cherry picked from commit 132cb7e5a6f892bba99d179d419afec754004e09)
2020-09-02 00:26:56 +02:00
nulano
5d57261b9c
fix text clipping due to rounding
...
(cherry picked from commit 35500aad08fb18a904f326df2ce8c59ae6413801)
2020-09-02 00:26:53 +02:00
nulano
e3450d1f6e
text bugfixes
2020-09-01 21:55:06 +02:00
nulano
cee61d7622
vertical text - cleanup and bugfixes
2020-09-01 21:55:06 +02:00
nulano
e8dcbff64e
horizontal text - cleanup and bugfixes
2020-09-01 21:55:06 +02:00
Hugo van Kemenade
e0eec1eb56
Merge branch 'master' into rm-3.5
2020-09-01 20:16:46 +03:00
Hugo van Kemenade
1ff90e7bdb
Merge pull request #4812 from PeterPetrik/fix_build_macos
2020-08-31 16:44:14 +03:00
nulano
9667d5c6cc
Merge branch 'master' into mingw-setup
2020-08-31 14:18:39 +01:00
Andrew Murray
799b25d9f1
Renamed zip header file
2020-08-31 22:44:51 +10: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
nulano
3cabcf242f
fix libtiff in MSYS2
2020-08-30 04:31:46 +02:00
Andrew Murray
0a46cbfea9
Reverted NaN change, so that NaN != NaN
2020-08-28 20:55:47 +10:00