Commit Graph

440 Commits

Author SHA1 Message Date
Andrew Murray
e2b007f0c2 Use transparency info key when converting to LA 2022-03-01 20:25:25 +11:00
Andrew Murray
0d729941a8 Handle packets that cross scan lines 2022-02-25 09:41:16 +11:00
Andrew Murray
17d342bc4b Simplified code as both values are 7 bit 2022-02-25 09:41:16 +11:00
Andrew Murray
7aa49741c6 Merge branch 'main' into getpalette 2022-02-20 23:52:20 +11:00
Andrew Murray
341802c2dc Removed unused argument 2022-02-19 10:50:07 +11:00
Hugo van Kemenade
1ec7be9a87
Merge pull request #6060 from radarhere/palette
Consider palette size when converting and in getpalette()
2022-02-18 23:31:56 +02:00
Hugo van Kemenade
0aca22e863
Merge pull request #6052 from radarhere/p2pa 2022-02-17 09:39:39 +02:00
Andrew Murray
852859476b Added rawmode argument to getpalette() 2022-02-17 10:15:03 +11:00
Andrew Murray
54cb09d8b4 When converting to P, restrict colors to palette size 2022-02-16 11:01:00 +11:00
Andrew Murray
948c064b28 Allow getpalette() to return less than 256 colors 2022-02-16 09:56:13 +11:00
Andrew Murray
41a9975377 Moved strcmp outside of loop 2022-02-14 21:50:19 +11:00
Andrew Murray
5411263d92 Simplified code 2022-02-14 19:24:47 +11:00
Andrew Murray
83d4f451fa Ensure image is opaque after converting P to PA with RGB palette 2022-02-14 16:10:59 +11:00
Andrew Murray
85b872deb6 Added unpacker from RGBA;15 to RGB 2022-02-07 10:18:14 +11:00
Andrew Murray
b894c8c73d Connected discontiguous polygon corners 2022-01-21 11:55:59 +11:00
Andrew Murray
c692fb42f8 Fixed comparison warnings 2022-01-18 14:19:43 +11:00
Andrew Murray
6565d5b1f3
Merge pull request #5517 from kmilos/patch-1
Explicitly enable strip chopping for large uncompressed TIFFs
2021-12-30 15:34:02 +11:00
Andrew Murray
4d1d2c9855
Merge pull request #5807 from DWesl/tkimaging-on-cygwin
Use the Windows method to get TCL functions on Cygwin
2021-12-30 00:08:31 +11:00
Hugo van Kemenade
3c39be3bc2
Merge pull request #5901 from radarhere/i16
Improved I;16 operations on big endian
2021-12-28 10:12:00 +02:00
Hugo van Kemenade
cc670c940e
Merge pull request #5869 from radarhere/quantize_palette
Fixed palette index for zeroed color in FASTOCTREE quantize
2021-12-28 10:05:58 +02:00
Hugo van Kemenade
e7b53259d1
Merge pull request #5824 from radarhere/l_macro
Added rounding when converting P and PA
2021-12-28 10:02:36 +02:00
Andrew Murray
aeb549ef8f Fixed unpacking I;16B to I;16 on big endian 2021-12-28 17:38:01 +11:00
Andrew Murray
4b7b07de70 Fixed JPEG2000 I;16 images on big endian 2021-12-28 17:06:05 +11:00
Andrew Murray
4222605442 Fixed freeing pointer 2021-12-27 13:39:37 +11:00
Andrew Murray
fdec387b4a Fixed palette index for zeroed color in FASTOCTREE quantize 2021-12-11 16:07:45 +11:00
Andrew Murray
6337428df1 Loading transparent pixels in C from subsequent GIF frames is no longer a problem 2021-11-29 17:49:12 +11:00
Andrew Murray
90a52d3c0d Added width argument to polygon 2021-11-16 22:02:54 +11:00
Andrew Murray
ca15c684ea Only prevent repeated polygon pixels when drawing with transparency 2021-11-15 23:28:29 +11:00
Andrew Murray
bb6212a332 Added rounding when converting P and PA 2021-11-10 08:00:58 +11:00
DWesl
c8391aaa4b Use the Windows functions to get TCL functions on Cygwin.
This is related to linking semantics, so Cygwin should follow the Windows codepath.
2021-11-03 13:03:55 -04:00
Hugo van Kemenade
716a0baf74 Drop support for EOL Python 3.6 2021-10-19 15:34:52 +03:00
Hugo van Kemenade
65b5f91b60
Merge pull request #5659 from wiredfool/fli_framesize 2021-09-05 14:14:58 +03:00
Eric Soroos
a20d45fc0b Fix 6-byte OOB read in FliDecode 2021-09-02 15:00:11 +03:00
Eric Soroos
8f300af691 Actually check the framesize in FliDecode. 2021-08-08 15:02:18 +02:00
Andrew Murray
9ad8c0c415 Updated location of make_hash script [ci skip] 2021-08-08 13:08:42 +10:00
Hugo van Kemenade
025f2071f5
Merge pull request #5598 from radarhere/i16
Consider I;16 pixel size when drawing text
2021-08-06 14:10:04 +03:00
Andrew Murray
622a1cd542 Changed URLs to HTTPS 2021-07-12 21:00:36 +10:00
Andrew Murray
a39cb04f3e Consider I;16 pixel size when drawing text 2021-07-09 21:23:43 +10:00
Miloš Komarčević
fa66d150e2 Enable strip chopping for large TIFFs 2021-07-01 00:43:56 +10:00
Andrew Murray
518ee3722a Use snprintf instead of sprintf 2021-06-30 23:52:56 +10:00
Andrew Murray
5f4504bb03 Limit sprintf modes to 10 characters 2021-06-30 19:35:09 +10:00
Hugo van Kemenade
f3db65db09
Merge pull request #5347 from radarhere/edge 2021-06-28 17:17:17 +03:00
Hugo van Kemenade
ec74f3b1c0
Merge pull request #5367 from radarhere/quant 2021-06-20 21:57:05 +03:00
Hugo van Kemenade
8b0244ac66
Merge pull request #5540 from radarhere/numresolution 2021-06-20 11:58:51 +03:00
Hugo van Kemenade
8f55c955db
Merge pull request #5535 from radarhere/tiff_format
Fixed format warning
2021-06-14 15:07:50 +03:00
Andrew Murray
bd298b128c Fixed default numresolution for small JPEG2000 images 2021-06-14 11:23:56 +10:00
Hugo van Kemenade
58661c978b
Merge pull request #5534 from radarhere/type 2021-06-12 21:30:15 +03:00
Andrew Murray
e00af259d8 Use PRIu64 to fix format warning 2021-06-11 18:27:36 +10:00
Hugo van Kemenade
101887360c
Merge pull request #5501 from radarhere/dds_bc5 2021-06-11 10:34:19 +03:00
Andrew Murray
5b0a63f76d Updated declaration to match definition 2021-06-10 19:01:12 +10:00
Andrew Murray
8099d01349 Fixed typo 2021-05-19 23:32:00 +10:00
Andrew Murray
2e7f40e0b8 Added BC5_SNORM reading 2021-05-18 17:44:21 +10:00
Andrew Murray
78406ed1ff
Merge pull request #5460 from xtsm/ellipse
Remove spikes when drawing thin pieslices
2021-05-14 23:37:11 +10:00
Alexander Karpinsky
2fa6537df3 HTTP link is not valid (wrong redirect) 2021-05-10 14:14:36 +03:00
Hugo van Kemenade
c1e1aeea87
Merge pull request #5458 from radarhere/tiff_deprecations 2021-05-09 23:14:22 +03:00
Stanislau Tsitsianok
0c9ffcfa14
Fixed #5432 2021-05-02 17:12:07 +03:00
Andrew Murray
11d1458316 Replaced uint16 and uint32 with uint16_t and uint32_t to resolve TIFF deprecations 2021-05-01 00:51:39 +10:00
Andrew Murray
8bc19ac78c Do not alter pixels outside mask when drawing text on an image with transparency 2021-04-29 23:08:25 +10:00
Hugo van Kemenade
9e73f7a324
Merge pull request #5374 from radarhere/static
Changed quantize and quantize2 to static
2021-04-19 17:58:35 +03:00
Hugo van Kemenade
197673b9b2
Merge pull request #4996 from nulano/jp2-decode-subsample 2021-04-17 21:42:17 +03:00
Andrew Murray
1e074f5040
Merge pull request #4144 from jansol/master
Stop decoding BC1 punchthrough alpha in BC2&3
2021-04-15 20:24:52 +10:00
Andrew Murray
2cb1d056c0 Merge branch 'master' into jp2-decode-subsample 2021-04-11 12:49:10 +10:00
Andrew Murray
c5f886958a Merge branch 'master' into quant 2021-04-11 12:41:48 +10:00
Andrew Murray
5491bd5eda Merge parallel horizontal edges in ImagingDrawPolygon 2021-04-11 12:41:32 +10:00
Andrew Murray
65cdc21105 Changed quantize and quantize2 to static 2021-04-11 12:40:59 +10:00
nulano
ee41a133dd formatting 2021-04-10 20:03:46 +02:00
Eric Soroos
441e6426ae Initialize buffer with 0, fixes valgrind undefined behavior issues 2021-04-09 13:41:23 +02:00
Andrew Murray
39fe85f308
Merge branch 'master' into jp2-decode-subsample 2021-04-03 09:26:55 +11:00
Andrew Murray
a69430047b Renamed function 2021-04-02 21:06:10 +11:00
Andrew Murray
6764650e2a Reduced memory usage 2021-04-02 20:48:06 +11:00
Andrew Murray
6541bd7cb5 Added second attribute to avoid unstable nature of qsort 2021-04-02 04:07:18 +11:00
Andrew Murray
7387ec23ac Revert "Removed return value of build_distance_tables"
This reverts commit a4a38b805b.
2021-04-02 04:07:18 +11:00
Hugo van Kemenade
694c84f88f
Fix typo [ci skip]
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2021-04-01 20:00:13 +03:00
Hugo van Kemenade
8febdad8dd Review, typos and lint 2021-04-01 17:41:46 +03:00
Eric Soroos
bb6c11fb88 Fix FLI DOS -- CVE-2021-28676
* FliDecode did not properly check that the block advance was
  non-zero, potentally leading to an infinite loop on load.
* This dates to the PIL Fork
* Found with oss-fuzz
2021-04-01 17:17:23 +03:00
Eric Soroos
3bf5eddb89 Fix OOB Read in Jpeg2KDecode CVE-2021-25287,CVE-2021-25288
* For J2k images with multiple bands, it's legal in to have different
  widths for each band, e.g. 1 byte for L, 4 bytes for A
* This dates to Pillow 2.4.0
2021-04-01 17:17:13 +03:00
Eric Soroos
87934e22d0 Fix for crash-0da0 2021-03-31 23:24:30 +02:00
Eric Soroos
45530d5ce1 fixes crash-74d2 2021-03-31 22:23:57 +02:00
wiredfool
4044ecc1fb
Merge pull request #5366 from kkopachev/kk-remove-extra-check
Remove redundant check (addition to #5364)
2021-03-31 20:54:07 +01:00
Hugo van Kemenade
c54a7bb031
Merge pull request #5333 from radarhere/gif_frame_transparency 2021-03-31 18:08:11 +03:00
Hugo van Kemenade
54e9f3bd0f
Merge pull request #5291 from raygard/giflzw 2021-03-31 17:58:44 +03:00
Hugo van Kemenade
727533148e
Merge pull request #5282 from radarhere/quantize
Set all transparent colors to be equal in quantize()
2021-03-31 17:58:21 +03:00
Hugo van Kemenade
06dfbb8e3e
Merge branch 'master' into giflzw 2021-03-31 16:45:02 +03:00
Hugo van Kemenade
d3ad66d851
Merge pull request #5332 from radarhere/typo
Corrected grammar
2021-03-31 09:40:41 +03:00
Ray Gardner
306d030fce Add comment to reference GIF LZW specification. 2021-03-30 17:35:21 -06:00
Konstantin Kopachev
19a815dd73
Remove redundant check
It's duplicated inside following call of TIFFReadTile
2021-03-29 11:27:50 -07:00
wiredfool
9a683db339
Merge pull request #5274 from radarhere/gradient
Fixed linear_gradient and radial_gradient I and F modes
2021-03-28 14:35:22 +01:00
Konstantin Kopachev
52ecf1b142 Stop guessing strip size and pass expected size 2021-03-28 15:03:37 +02:00
Konstantin Kopachev
ab24c98491 Add sanity check for memory overruns 2021-03-28 15:03:37 +02:00
Konstantin Kopachev
1c295bf43c Check for dimensions and sizes to fit into int 2021-03-28 15:03:37 +02:00
Konstantin Kopachev
e438046201 Refactor into smaller functions 2021-03-28 15:03:37 +02:00
Konstantin Kopachev
4dd288c66c unify reading of YCbCr Tiffs 2021-03-28 15:03:37 +02:00
Konstantin Kopachev
4c2dfadf26 Swap pixel values on Big Endian 2021-03-28 15:03:37 +02:00
Konstantin Kopachev
169bb4842f only use TIFFReadRGBA* in case of o_jpeg compression 2021-03-28 15:03:37 +02:00
Eric Soroos
f2020eeab4 UINT8 -> int for plane 2021-03-28 15:03:37 +02:00
Eric Soroos
b1d3f0d5c2 not 2021-03-28 15:03:37 +02:00
Eric Soroos
c9ea87ecfd Use flag instead of recalculating 2021-03-28 15:03:37 +02:00
Eric Soroos
fda638befe Planes should be int, not uint 2021-03-28 15:03:37 +02:00
nulano
daf7b6546e remove double pointer 2021-03-28 15:03:37 +02:00
nulano
a921c01102 correct TIFFTAG_PLANARCONFIG size 2021-03-28 15:03:37 +02:00