Commit Graph

324 Commits

Author SHA1 Message Date
Andrew Murray
1a7a1123e6
Merge branch 'master' into tiff-old-jpeg 2019-02-15 19:56:17 +11:00
Andrew Murray
7acaf3d6a6 Added support for I;16 modes for more transpose operations 2019-01-10 07:26:52 +11:00
Hugo
0f09274690 Remove more unused hashtable functions 2019-01-05 22:26:35 +02:00
Hugo
f0778ba594 Remove unused hashtable destroy functions 2019-01-05 21:07:11 +02:00
Hugo
78bc4da131
Merge pull request #3350 from radarhere/custom_tags
Added custom int and float TIFF tags
2018-12-26 13:07:46 +02:00
Hugo
55e5b7de6c
Merge pull request #3393 from frenzymadness/CWE_fixes_master
Fixes for issues reported by static code analysis
2018-12-26 13:02:19 +02:00
Konstantin Kopachev
e91b851fdc
Add reading old-JPEG compressed TIFFs
Old-style JPEG compression in TIFFs are able to be read using Strip/Tile APIs. Although, it should be possible to read them using Scanline API, it does not work for some reason.  Anyway, reading subsampled YCbCr formats through Strip/Tile/Scanline libtiff API does not de-subsample the data, so caller should unpack data to whatever format is appropriate.  New-style JPEG compressed images were already read through libtiff as RGB images (https://github.com/python-pillow/Pillow/pull/3227). Unfortunately, there is no flag to ask libtiff to de-subsample old jpeg, but it provides a way to read any image as 32bit RGBA.  This commit adds ability to read old-style JPEG TIFFs through reading *all* YCbCr images as RGBX using Tile and Strip reading API. This supersedes previous work (PR #3227) to read new-style JPEG-TIFFs.
2018-12-10 10:07:41 -08:00
Andrew Murray
ddf8593e7b Do not write custom tags with libtiff < 4 2018-11-12 06:14:04 +11:00
Andrew Murray
a3d45e9cef Added custom int and float TIFF tags 2018-11-12 06:14:04 +11:00
Konstantin Kopachev
28cdb993b9
Convert tabs into spaces [ci skip] 2018-10-19 11:43:22 -07:00
Konstantin Kopachev
2bf3ceee85
Only ask for YCbCr->RGB libtiff conversion for jpeg-compressed tiffs
JPEG-related tiff pseudo-tags are registered only when tiff image has jpeg compression. Trying to set TIFFTAG_JPEGCOLORMODE on non jpeg-compressed file prints error "Unknown pseudo-tag 65538".
2018-10-18 21:27:51 -07:00
Lumir Balhar
78bf8ea041 Fix potential leaked storage issues (CWE-772) 2018-10-02 14:06:21 +02:00
Lumir Balhar
2e288e74ab Fix potential un-terminated buffer problem (CWE-120) 2018-10-02 14:06:08 +02:00
Hugo
799133b3a4
Merge pull request #3388 from hugovk/andreas-schwab/master
Avoid undefined behaviour due to division by zero
2018-09-29 22:49:44 +03:00
Hugo
d36365f4fb
Merge pull request #3227 from kkopachev/master
Adding support to reading tiled and YcbCr jpeg tiffs through libtiff
2018-09-29 19:45:29 +03:00
Hugo
9a0b960762 Re-use count variable 2018-09-29 19:23:49 +03:00
Andreas Schwab
8b34eb644f Avoid undefined behaviour due to division by zero 2018-09-29 19:23:49 +03:00
Andrew Murray
1e305380ae
Merge pull request #3094 from hugovk/add-width-to-shapes
Add line width parameter to rectangle and ellipse-based shapes
2018-09-29 23:21:03 +10:00
Andrew Murray
d6d61b35dc Only draw pieslice's inner lines once 2018-09-29 21:45:37 +10:00
Konstantin Kopachev
69f315a585
PR feedback: simplified key construct for fillorder=2; indentation fixes 2018-09-26 09:44:45 -07:00
Konstantin Kopachev
300bdaad9e
Bring back YCbCrX in pack and unpack 2018-09-25 11:46:32 -07:00
Konstantin Kopachev
187782470b
Drop YCbCrX(XX) modes, as TIFF does not have to support that 2018-09-18 12:06:27 -07:00
Konstantin Kopachev
c2ac4604bc
move variable declaration 2018-09-18 12:05:50 -07:00
Konstantin Kopachev
f0436a4ddc
Adding support to reading tiled and YcbCr jpegs tiffs through libtiff 2018-09-18 12:05:49 -07:00
Andrew Murray
558e70d8cd Removed less than condition 2018-09-09 13:57:01 +10:00
Alexander Karpinsky
f7eb11cc3d
Merge branch 'master' into more-tiff-modes 2018-09-05 17:58:31 +03:00
Alexander
accc66fb5e add support for RGBaXX and RGBaX raw tiff modes 2018-09-05 17:45:03 +03:00
Alexander
ad5cf0a0e2 Add RGBAX and RGBAXX tiff modes 2018-09-05 17:36:27 +03:00
Hugo
fbe5bdb6b6 Also apply width to pieslice's inner lines 2018-09-01 14:40:36 +03:00
Hugo
f70f952f85
Merge branch 'master' into add-width-to-shapes 2018-07-14 14:58:48 +03:00
Andrew Murray
448beaa9aa Improved wording [ci skip] 2018-07-12 19:48:59 +10:00
Hugo
d6e3ef85c2 Add width parameter to arc, chord, ellipse, pieslice 2018-07-02 11:26:42 +03:00
Hugo
9dedbff713 Add width parameter to rectangle 2018-07-02 11:21:30 +03:00
Hugo
af552801c2
Merge pull request #3186 from danpla/tga-write-rle
TGA: Add support for writing RLE data
2018-07-01 22:00:03 +03:00
Hugo
241ea6b283
Merge pull request #3196 from tkoeppe/avg_fix
[QuantOctree.c] Remove erroneous attempt to average over an empty range
2018-07-01 21:45:46 +03:00
Hugo
2b09e7fa6a
Merge pull request #3099 from uploadcare/lut-numpy
NumPy support for LUTs
2018-07-01 13:18:03 +03:00
Thomas Köppe
6c0d1e0f15 [QuantOctree.c] Remove erroneous attempt to average over an empty range. 2018-06-21 12:45:54 +01:00
Daniel Plakhotich
1d20056234 TGA: Add support for writing RLE data 2018-06-15 23:01:06 +03:00
Andrew Murray
8d8d00f304 Changed ellipse point calculations to be more evenly distributed 2018-05-27 15:32:22 +10:00
Andrew Murray
765a6c7e74 Updated redirected URLs 2018-04-30 14:20:32 +10:00
Andrew Murray
f77adb5ab3 Replaced broken URLs with archive URLs 2018-04-30 11:01:09 +10:00
Andrew Murray
57c7a51b51 Renamed CLIP to CLIP8 2018-04-21 18:14:05 +10:00
Andrew Murray
99dcc57720 Moved CLIP definitions into ImagingUtils.h 2018-04-21 16:35:58 +10:00
Andrew Murray
eebe3ea923 Corrected undefined behaviour 2018-04-21 13:42:39 +10:00
Alexander
497e9d8251 full buffer support 2018-04-15 00:33:15 +03:00
Alexander
2c87242027 Support for many many LUT source on C level 2018-04-14 23:12:28 +03:00
Andrew Murray
032027303f Fixed typo 2018-04-11 13:46:42 +10:00
Alexander Karpinsky
e24fad40ad
Merge pull request #3056 from uploadcare/color-LUT
3D Color lookup tables
2018-04-09 10:41:44 +03:00
Jon Dufresne
b56fe11086 Remove unnecessary #if 1 directive
The preprocessor directive `#if 1` always evaluates as true, so the
enclosed code is always compiled.

The directive has existed since the original fork from PIL,
9a640e3157.
2018-04-04 05:30:05 -07:00
Alexander
79ed02b8f4 Fix _i2f compilation on some GCC versions 2018-04-02 17:10:51 +03:00
Kathryn Davies
8f6be2ee7d Move location of fclose and add dump test. 2018-03-31 21:28:37 -07:00
Alexander
76d467245d Release GIL 2018-03-31 09:52:05 +03:00
Kathryn Davies
147f835146 Fix a resource leak: close fp before return (found by cppcheck) 2018-03-30 15:42:56 -07:00
Alexander
d2a5d1e44d Add tests for some cases and fix bugs 2018-03-29 23:56:51 +03:00
Alexander
461a090405 Python interface 2018-03-29 14:40:34 +03:00
Alexander
71f643e1ea doesn't affect accuracy, but a bit faster 2018-03-29 11:57:37 +03:00
Alexander
838a5cffe7 more tests and fixed bug for interpolate4 2018-03-26 23:17:17 +03:00
Alexander
5227c30561 typos 2018-03-26 22:33:22 +03:00
Alexander
78d16d30c4 share clip8_lookups table between Resample and ColorLUT 2018-03-26 18:02:08 +03:00
Alexander
df192fff1e one function table_index3D 2018-03-26 17:41:25 +03:00
Alexander
845f4dbfe1 update comment 2018-03-26 17:34:56 +03:00
Alexander
3a5f0201f5 pure FPI implementation 2018-03-26 17:23:14 +03:00
Alexander
23827d5250 3D to 4D implementation 2018-03-26 14:18:17 +03:00
Alexander
696ae12b37 3D to 3D implementation 2018-03-26 14:14:52 +03:00
Alexander
d2d546d4ae Python to C bridge 2018-03-26 11:26:51 +03:00
Alexander
853208c65f color 3D LUT, just start 2018-03-25 15:49:42 +03:00
Metallicow
22a59ac839 Trim trailing whitespace src dir 2018-01-27 00:02:56 -06:00
wiredfool
9a19858fb7
Merge pull request #2938 from uploadcare/tiff-with-optional-channels
Tiff with optional channels
2018-01-24 11:10:18 +00:00
Andrew Murray
25e72d5856 Fixed typos 2018-01-24 21:54:16 +11:00
Alexander
dc127273f4 Add RGBXX RGBXXX YCbCrXX YCbCrXXX rawmodes for TIFFs 2018-01-07 17:23:05 +03:00
Alexander
1f4fd49a80 unpack CMYK TIFFs optional channels 2018-01-07 17:23:05 +03:00
Eric Soroos
4bc33d3e4a Remove _imaging.crc32 in favor or builtin python crc32 implementation 2018-01-05 15:53:50 +00:00
wiredfool
ef5bab99b5 fixed merge 2017-12-28 16:07:18 +00:00
wiredfool
0bb3f4fee9 source layout reorg 2017-12-28 14:49:47 +00:00