Commit Graph

10 Commits

Author SHA1 Message Date
Andrew Murray
1a7a1123e6
Merge branch 'master' into tiff-old-jpeg 2019-02-15 19:56:17 +11: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
Konstantin Kopachev
69f315a585
PR feedback: simplified key construct for fillorder=2; indentation fixes 2018-09-26 09:44:45 -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
wiredfool
0bb3f4fee9 source layout reorg 2017-12-28 14:49:47 +00:00