Commit Graph

460 Commits

Author SHA1 Message Date
Hugo
65c55402b9
Merge pull request #3537 from radarhere/pickle
Fixed pickling of iTXt class with protocol > 1
2019-02-20 11:50:30 +02:00
Andrew Murray
1a7a1123e6
Merge branch 'master' into tiff-old-jpeg 2019-02-15 19:56:17 +11:00
Andrew Murray
0481d0ac1e Seek to IFD offset 2019-01-16 06:55:37 +11:00
Hugo van Kemenade
4d1be57256
Merge pull request #3540 from radarhere/fp
Only close __fp if not fp
2019-01-06 12:53:04 +02:00
Hugo van Kemenade
22b0f53eb9
Merge pull request #3532 from radarhere/png_load_end_idat
PNG: Handle IDAT chunks after image end
2019-01-05 12:08:58 +02:00
Andrew Murray
71b64dcf73 Only close __fp if not fp 2019-01-04 12:29:23 +11:00
Andrew Murray
ea2a0e4654 Handle IDAT chunks after image end 2019-01-03 19:13:19 +11:00
hugovk
1b338998dc Test a png file with iTXt chunks 2019-01-03 09:31:55 +11:00
Andrew Murray
bd7422f934 Detect whether mimetype is image/jp2 or image/jpx 2019-01-02 15:39:39 +11:00
pirate486743186
8d0b7e6b57 adding apng extension for png 2018-12-26 21:14:27 +01: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
Hugo
a4fccd3dde
Merge pull request #3479 from radarhere/gif_extension
Allow arbitrary number of comment extension subblocks
2018-12-04 23:09:59 +02:00
Andrew Murray
f1b2802eb1 Resolved error for comment extension with zero subblocks 2018-11-27 21:09:28 +11:00
Andrew Murray
2f7f945c84 Ensure previous FLI frame is loaded before seeking to the next 2018-11-26 18:52:51 +11: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
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
b5af283732 Added support to floodfill for non-RGB colors 2018-09-26 22:22:17 +10:00
Hugo
78203606b7
Merge pull request #3364 from radarhere/contain
Added ImageOps pad method
2018-09-26 13:54:26 +03:00
Andrew Murray
b09b43d8b2 Added ImageOps pad method 2018-09-26 20:07:46 +10:00
Konstantin Kopachev
b0e5e5fb11
Update test files to be closer match of originals 2018-09-18 12:05:51 -07:00
Konstantin Kopachev
98d88fd1c6
Add tests for uncompressed tiff with interleaved bands 2018-09-18 12:05:50 -07:00
Konstantin Kopachev
1f63abdba8
Fix tiled raw tiff read and add tests 2018-09-18 12:05:49 -07:00
Martin Packman
0b3036454c Give correct extrema for I;16 format images
Currently gives None for a 16 bit greyscale image rather than the
true min and max values in the 0-65536 range. The internal
ImagingGetProjection function already supports I;16 but the
_getextrema needs to know to unpack the result.
2018-09-18 13:48:12 +01:00
Hugo
521ae77bb9
Merge pull request #3298 from kkopachev/webp-rgb
Read/save RGB webp as RGB (instead of RGBX)
2018-09-17 12:05:07 +03:00
Andrew Murray
f3842460ba Added line joints 2018-09-16 21:29:09 +10:00
Hugo
fbe5bdb6b6 Also apply width to pieslice's inner lines 2018-09-01 14:40:36 +03:00
Konstantin Kopachev
84b32a0388
Read/Save RGB webp as RGB (instead of RGBX) 2018-08-09 11:40:10 -07:00
Hugo
f70f952f85
Merge branch 'master' into add-width-to-shapes 2018-07-14 14:58:48 +03:00
tsennott
4a6ec5ca72 updated colorize to allow optional black/white positions; enhanced tests 2018-07-07 18:19:26 -07:00
tsennott
837d868333 updated test to assert equality with reference images 2018-07-07 02:40:25 -07:00
Hugo
5d751572cc
Merge pull request #2922 from radarhere/fill_ink
Skip outline if the draw operation fills with the same colour
2018-07-02 22:19:35 +03: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
80d399a485
Merge pull request #3178 from danpla/tga-la
TGA: Read and write LA data
2018-07-01 21:57:10 +03:00
Hugo
597f067796
Merge pull request #2989 from hugovk/test-wal
Test WalImageFile
2018-07-01 09:34:15 +03:00
Hugo
5dda23d547
Merge pull request #3135 from hugovk/test-imagedraw2
Test ImageDraw2
2018-07-01 07:48:54 +03:00
Alex Clark
eafbb395a9
Merge pull request #1817 from radarhere/gd
Added GD tests
2018-06-30 18:01:36 -04:00
Daniel Plakhotich
1d20056234 TGA: Add support for writing RLE data 2018-06-15 23:01:06 +03:00
Daniel Plakhotich
39fae6e077 TGA: Read and write LA data 2018-06-14 12:18:08 +03:00
Hugo
031c4d937f Test ImageDraw2 2018-05-31 15:11:50 +03:00
storesource
79689977cf Remove unnecessary files 2018-03-27 21:05:19 +05:30
storesource
e1229db810
Rename File 2018-03-27 20:07:06 +05:30
storesource
eb3efb2587
Added Files for Rotate Fill tests 2018-03-27 19:52:24 +05:30
storesource
8af7c679ab
Added basic green file for rotate
Making changes according to review
2018-03-27 19:43:04 +05:30
storesource
65c78266ad
RotateImage with fill: Added file for assertion
Fail First: add image for assertion
2018-03-27 18:55:34 +05:30
wiredfool
d173e81798
Merge pull request #3023 from kkopachev/issue-3022
Certain corrupted jpegs can result in no data read
2018-03-21 07:55:17 +00:00
Jerome Leclanche
ef546cd303 blp: Remove images with unclear licenses 2018-03-12 09:48:13 +02:00
Konstantin Kopachev
5269bbc268
Add truncated jpeg tests 2018-03-07 21:31:51 -08:00
Jerome Leclanche
4d685ac0cd blp: Add more test images 2018-03-06 18:16:26 +02:00
Jerome Leclanche
73d7fff16e blp: Separate BLP1 and BLP2 decoding more cleanly 2018-03-06 18:16:26 +02:00
Jerome Leclanche
adaa703576 Add support for BLP file format 2018-03-06 18:16:26 +02:00
Hugo
8674f71907 File exported from hopper.png using Wally 2018-01-29 15:33:26 +02:00
Andrew Murray
4d3339b703 Added tests 2018-01-05 11:26:24 +11:00
Andrew Murray
6c61de97ad Added GD tests 2017-12-30 19:31:33 +11:00
wiredfool
49bd3232e5
Merge pull request #2899 from wiredfool/pr_2882
Run all compressed tiffs through libtiff
2017-12-27 20:39:51 +00:00
Andrew Murray
e107ed6fcf Allow for an empty line in EPS header data 2017-12-24 21:12:48 +11:00
Eric Soroos
d698d522ef Added end to end tests in test_file_libtiff 2017-12-20 12:09:26 +00:00
Eric Soroos
bec8f415be end to end test helper, more end to end tests for tiffs 2017-12-20 11:55:40 +00:00
wiredfool
9ed4ea9e47
Merge pull request #2883 from uploadcare/tiff-wrong-bitspersample
Fix count of BITSPERSAMPLE items in broken TIFF files
2017-12-09 14:32:47 +00:00
Alexander
ce151bcd72 add test for this case 2017-12-08 17:32:39 +03:00
wiredfool
a3a9faf3a2
Merge pull request #2761 from monolithlabs/animated_webp
Add support for animated WebP files
2017-11-05 15:34:50 +00:00
wiredfool
f5e4338b86
Merge pull request #2813 from wiredfool/issue_2811
Permit LZW code lengths up to 12 bits in GIF decode
2017-11-05 15:02:41 +00:00
Eric Soroos
7a5d215022 Remove Adobe Helvetica screen font, update Pcf font tests using freely available font 2017-11-02 13:07:49 +00:00
Eric Soroos
fcabe1c08c Tests for issue #2811 2017-10-25 13:52:33 +00:00
Mickael Bonfill
a422a28bb7 add unit tests 2017-09-29 09:15:21 +00:00
Jason Douglas
cd12a48fe0 - Support non-alpha modes with WebPAnimDecoder
- Support writing metadata chunks with WebPAnimEncoder
- Add XMP metadata support to legacy WebPEncode wrapper
- Cleanup unused mux code in legacy WebPDecode wrapper
- Fix some bugs present when compiled without WebP Mux support
- Fix conversion from L/P/PA modes when saving WebP files
- Update existing tests, and add new ones for WebP animation and metadata support
2017-09-26 20:27:40 -07:00
wiredfool
6198422383 Merge pull request #2748 from wiredfool/i16s
Fix TIFF support for I;16S, I;16BS, and I;32BS rawmodes
2017-09-22 15:57:56 +01:00
Andrew Murray
4087479464 Added test image 2017-09-20 09:04:48 +00:00
Eric Soroos
56e490fe7c Test for issue #2278 2017-09-14 20:05:13 +01:00
Eric Soroos
c42867fa2c Added expected result, renamed images 2017-09-09 12:01:38 +00:00
Samuele Kaplun
c07ce878d7 Fix EPS import
Fixes EPS import by adding the missing "showpage" Postscript command
to the end of the gs call.

See: https://bugs.ghostscript.com/show_bug.cgi?id=698272

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
2017-09-09 12:01:38 +00:00
Alexander
846f986bc8 Tests for 16bit tiff 2017-08-21 17:10:05 +03:00
wiredfool
c0f0268651 Merge pull request #2667 from vytisb/exif_zerodivision
Fix ZeroDivisionError when EXIF contains invalid DPI (0/0).
2017-08-16 15:39:20 +01:00
wiredfool
b56d533aea Merge pull request #2650 from hugovk/fix-fli-seek-load
Test animated FLI file
2017-08-16 11:44:35 +01:00
Alexander
847dd67a41 serious test for kernel filters 2017-08-12 23:22:59 +03:00
Vytis Banaitis
7c8e0e4457 Fix ZeroDivisionError when EXIF contains invalid DPI (0/0). 2017-08-09 16:16:14 +03:00
Hugo
47aa59a046 Add from https://samples.libav.org/fli-flc/
https://samples.libav.org/ says:

This is the Libav samples collection.
You can find samples of various common and uncommon
multimedia formats here. The size of the collection
currently is 54GB and growing.

You are free to download any samples you want, but
if you want to download more than just a few or want
to mirror the whole collection please send a mail to
webmaster(AT)libav(DOT)org *before* you start
and ask for permission.

We can also ship the samples collection to you for a
reasonable fee, inquire for details.

The best way to download samples is with rsync. If you decide
to fetch a large amount (more than 1GB), please limit the rate
to no more than 50 kBps (use the --bwlimit option of rsync).

Please be aware that this samples collection contains a lot
of files that are very obscure, broken in various ways or
are just simply out of use. Hence, it doesn't make sense
to download all of them, unless you are developing a player
applic
2017-08-04 12:39:19 +03:00
wiredfool
908fffdd2c Test for https://github.com/python-pillow/Pillow/issues/2628#issuecomment-315962612 2017-07-18 01:06:54 -07:00
wiredfool
8feac899dd Merge pull request #2576 from wiredfool/pr_2284
Complex Text Support
2017-07-01 10:45:18 +01:00
Fran Barba
ebaa509d66 Adjust buffer size when icc_profile > MAXBLOCK (issue #148)
We were encountering some errors when saving specific JPEG images.
The error was shown in stderr as:
  IOError: encoder error -2 when writing image file

And on stdout it printed:
    Suspension not allowed here

The problem was the bufsize not contemplating the icc_profile block.
2017-06-28 12:11:33 +02:00
shamsa
312c87e279 fix testing 2017-06-21 14:00:14 -07:00
shamsa
a77850564a Fix gitsize function. 2017-06-21 14:00:14 -07:00
shamsa
fcd20da3cb Testing complex text layout. 2017-06-21 14:00:14 -07:00
wiredfool
8323ab1149 Merge pull request #2447 from hugovk/test-mic
Test MicImagePlugin for correctness
2017-06-13 22:20:44 +01:00
wiredfool
1cfb20a2a9 Merge pull request #2533 from hugovk/imagedraw
Add more ImageDraw.py tests and remove unused Draw.c code
2017-06-13 13:10:32 +01:00
hugovk
9626e49c0b Test a McIDAS area file 2017-05-28 16:11:16 +03:00
hugovk
206e316c0e Test limits of arc/ellipse's start and end 2017-05-15 22:58:51 +03:00
hugovk
f1631e0d05 Test drawing a rectangle bigger than the image 2017-05-15 21:44:28 +03:00
hugovk
5871b7a5ba Test drawing a wide "line" from one point to another just draws a single point 2017-05-15 21:32:54 +03:00
Hugo
ae9181f0a4 Test polygons in RGB and L modes 2017-05-15 18:24:12 +03:00
Hugo
e77c3b3eb2 Test ellipse in RGB and L modes 2017-05-15 18:23:00 +03:00
Hugo
de1f156fcd Add test file 2017-05-15 18:13:36 +03:00
Hugo
d4a350cd79 Test chord in RGB and L modes 2017-05-15 18:04:33 +03:00
Hugo
3db1944762 Test drawing polygons with sloped and flat lines 2017-05-15 17:09:29 +03:00
Hugo
b2933dc1c4 Image from Simon Conseil with permission: https://github.com/python-pillow/Pillow/issues/2481#issuecomment-293215833 2017-04-11 13:45:48 +03:00
Hugo
53df62647a DPI is a tuple (#2472)
* DPI is a tuple

* Some EXIF only contains an X resolution for DPI

* Refactor

* Test with no DPI in EXIF

* Handle EXIF with no DPI

* Created with: exiftool "-*resolution*"= photoshop-200dpi.jpg

* Test when not in EXIF, DPI==72,72

* Use X resolution for Y, default to 72,72 dpi

* Created with: exiftool -exif:ResolutionUnit=cm photoshop-200dpi.jpg

* Test for EXIF with dpcm instead of dpi

* Convert dpcm to dpi, and default to inches if unit unknown
2017-04-03 23:28:33 +01:00
Hugo
92acfca46f Test getting DPI from EXIF 2017-03-14 11:26:11 +02:00
Hugo
92c32ccf37 Created in Microsoft Image Composer 1.5 from hopper.png 2017-03-13 07:58:47 +02:00
wiredfool
c9f54c98a5 Merge pull request #1938 from wiredfool/python-decoder
Pure Python Decoders - fix for MSP decoding
2017-03-12 17:20:19 +00:00
hugovk
cac235bbd6 Created by forcing Pillow to save with checksum=0 2017-03-11 13:50:19 +00:00
wiredfool
f72ceda7c6 version 1 pickle for x-verson compatibility 2017-03-08 01:35:15 -08:00
wiredfool
1428e4140a Test for identical handling of getheader/getdata 2017-03-08 01:35:15 -08:00
wiredfool
c0ca5c184d Merge pull request #2443 from hugovk/test-containerio
Test ContainerIO for correctness
2017-03-06 18:54:38 +00:00
wiredfool
9f88a55fa3 Merge pull request #2442 from hugovk/test-xvthumb
Test XVThumbImagePlugin for correctness
2017-03-06 18:53:58 +00:00
wiredfool
1a8f88986d Merge pull request #2441 from hugovk/test-bufrstub
Test BufrStubImagePlugin for correctness
2017-03-06 18:53:13 +00:00
hugovk
83252ca4b1 Test ContainerIO for correctness 2017-03-05 00:46:30 +02:00
hugovk
dc3233d52c Created by editing hopper.p7 in a text editor 2017-03-04 23:31:49 +02:00
hugovk
7371e813f6 pngtopam hopper.png | pamtoxvmini > hopper.p7 2017-03-04 19:52:49 +02:00
hugovk
f09427c8bd From http://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs.2017030406/ 2017-03-04 16:25:28 +02:00
hugovk
adda419ad6 From http://www.globalmarinenet.com/free-grib-file-downloads/ 2017-03-04 13:04:50 +02:00
wiredfool
2fb9c1a337 Merge pull request #2431 from hugovk/test-hdf5stub
Test Hdf5StubImagePlugin for correctness
2017-03-01 09:15:53 +00:00
hugovk
48f6be40cc Created via http://stackoverflow.com/a/29736206/724176 2017-02-28 22:21:47 +02:00
hugovk
76cde2fafb convert hopper.png hopper.fits 2017-02-28 21:40:58 +02:00
Hugo
c9e139e260 Image created with Photoshop 2017-02-28 08:22:03 +02:00
Hugo
1a607bfd56 Resave hopper.psd with ICC profile, using Photoshop 2017-02-27 16:45:31 +02:00
wiredfool
c05ac25d6a Merge pull request #2381 from hugovk/convert-matrix
Test matrix convert
2017-02-20 22:37:25 +00:00
wiredfool
d707cb3692 Tight similarity tests for XYZ conversion 2017-02-20 13:41:28 -08:00
wiredfool
9c4eafc188 Merge pull request #2382 from hugovk/test-effects
Test linear and radial gradient effects
2017-02-06 21:58:41 +00:00
hugovk
d7fe8d1eb7 Linear and radial gradient: only need one target image 2017-02-06 22:03:17 +02:00
hugovk
96dfd722c3 Test ImageDraw.Outline curve 2017-01-31 08:22:33 +02:00
hugovk
008431fe0e Test ImageDraw.Outline curve 2017-01-30 21:50:48 +02:00
hugovk
07af06bf8c Expose and test radial_gradient 2017-01-29 18:44:24 +02:00
hugovk
47b1c66961 Expose and test linear_gradient 2017-01-29 18:17:31 +02:00
wiredfool
7228de1491 test image 2016-12-31 19:31:02 +00:00
wiredfool
95888466c8 Added correctness tests for opening SGI images 2016-12-30 22:20:46 +00:00
Alexander
52c8e2050e replace test "1"-mode image 2016-12-07 03:09:13 +03:00
hugovk
4061c3836c Created with IrfanView 2016-11-30 14:38:04 +02:00
glexey
0116c9240e EMF: support negative bounding box coordinates (#2249)
* EMF: support negative bounding box coordinates

Similar to placeable WMF, bounding box coordinates
should be interpreted as signed integer, otherwise
opening EMF file with negative (x0,y0) fails.

* Basic load tests for WMF and EMF formats

* WMF/WMF tests: just test open(), not load()

Not sure why load() fails on Debian build. Well, at least we can test
open().

* WMF/EMF: Unpack signed integers using unpack()

* WMF/EMF: Compare to reference PNG rendering

* EMF/WMF comparison: use assert_image_similar()

* Use similarity epsilon 0.5 for WMF, as vector rendering looks different across Windows platforms

* Trigger rebuild
2016-11-27 16:03:51 +00:00
wiredfool
e43c91cf1c Working 1 bit sun_rle raster file 2016-11-19 19:16:46 -08:00
Jake Merdich
991df9b87a Update test image for xbgr bmp files 2016-11-14 10:26:57 -05:00
Jake Merdich
e63b97ea42 Add testing for bmp 'questionable' files 2016-11-14 10:10:56 -05:00
wiredfool
c50ebe6459 Map.c overflow fixes 2016-10-03 07:27:02 -07:00
wiredfool
5d8a0be45a Memory error in Storage.c when accepting negative image size arguments 2016-10-03 07:27:02 -07:00
wiredfool
2db3f00e92 Merge pull request #2141 from wiredfool/tiff_fd
Move libtiff fd duplication to _load_libtiff
2016-10-03 06:03:50 -07:00
wiredfool
b81da5a322 Tests for issue #1651 2016-09-29 22:29:19 +01:00
Marcus Brinkmann
c74e45e87c Force reloading palette when using mmap in ImageFile. 2016-09-29 14:54:25 +02:00
Robert Nix
2be760ca79 Add support for BC7 to DdsImagePlugin 2016-08-26 02:26:03 -05:00
Robert Nix
b46804ea27 Add support for DXT3 to DdsImagePlugin 2016-08-25 20:12:44 -05:00
Robert Nix
18a91cebcf Move DDS decoders to C
- Fixed inaccurate BC1/BC3 texture decoding
2016-08-25 19:27:48 -05:00
homm
2221a6467c fix test which relied on old bugs 2016-07-11 01:47:25 +03:00
wiredfool
872fd0652e Merge pull request #1846 from wiredfool/pr_1826
EPS + CMYK
2016-06-30 15:23:24 +01:00
wiredfool
97dbb5cd33 Merge pull request #1977 from kkopachev/jpeg-junk-header
Skip extra 0xff00 in jpeg
2016-06-25 15:30:19 +01:00
wiredfool
c1d25d9062 Merge pull request #1985 from wiredfool/palette
Use bytearray for mutable palette storage
2016-06-25 15:14:07 +01:00
wiredfool
95874635e1 Merge pull request #1984 from wiredfool/pr_1824
Pr 1824 rebase
2016-06-25 15:01:34 +01:00
Bryant Mairs
7fb24e8af0 Add test for reading and writing uint16 TIFFs. 2016-06-25 12:20:37 +01:00
Konstantin Kopachev
c8f93c979c
Skip extra 0xff00 in jpeg 2016-06-22 13:36:23 -07:00
Andrew Murray
3c2e374824 Added test 2016-06-09 22:28:29 +01:00
homm
1a6c6b1250 tests for icc profile in png 2016-05-12 20:31:54 +03:00
wiredfool
460480dfff Merge pull request #1847 from wiredfool/revert-1813-DIB_1293
Revert 1813, plus second commit with tweaks.
2016-05-01 10:31:59 +01:00