Commit Graph

155 Commits

Author SHA1 Message Date
Andrew Murray
47775f3d50 Resolve __fp when closing and deleting 2018-11-17 21:56:06 +11:00
Hugo
ceebfc6fe8 flake8: E501 line too long 2018-11-11 19:01:11 +02:00
Hugo
619e5fde8d Remove unused local variables 2018-10-24 22:29:01 +03:00
Andrew Murray
929f7397db Line too long 2018-10-21 18:26:08 +11:00
Andrew Murray
6f44ae1d27 Only deprecate setting of TIFF image sizes 2018-09-30 15:08:35 +10: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
a8261a2e89 Line too long 2018-09-27 20:35:00 +10:00
Andrew Murray
f8fbac68de Removed unused imports 2018-09-27 20:31:01 +10:00
Konstantin Kopachev
98d88fd1c6
Add tests for uncompressed tiff with interleaved bands 2018-09-18 12:05:50 -07:00
Konstantin Kopachev
52637a4268
move libtiff-related tests into libtiff test file 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
Jon Dufresne
875e8c4bda Avoid catching unexpected exceptions in tests
Instead, allow exceptions to bubble up to the unittest exception
handler.

Prevents replacing the exception trace with a less informative
message. As the exceptions are always unexpected, should not need to
catch them explicitly in tests.
2018-09-04 19:43:20 -07:00
Andrew Murray
c2189235af Line too long 2018-07-02 19:26:02 +10:00
Andrew Murray
9a3d554c1d Changed Exception tests to be more specific 2018-06-12 04:41:31 +10:00
Andrew Murray
5ef5a3c9b2 Corrected test 2018-06-06 22:34:09 +10:00
Andrew Murray
b4e6cdadac Added py3 variable to _util 2018-04-20 09:19:13 +10:00
Andrew Murray
c13ccf13a1 Added missing whitespace 2018-03-06 19:53:07 +11:00
Andrew Murray
2202196162 Flake8 blank line fixes 2018-03-04 21:36:33 +11:00
Andrew Murray
30b2ddd070 Removed duplicate imports 2018-01-04 15:40:46 +11:00
Eric Soroos
e617d05b9e These tests/features now require libtiff 2017-12-20 12:22:28 +00:00
Eric Soroos
4877552581 Read all compressed files through libtiff. 2017-12-20 11:55:40 +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
Tomasz Jezierski
bc6683cecf tiff-colors-fix test adjust 2017-12-20 11:54:26 +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
Andrew Murray
bc255c97ff Added support for generators when using append_images 2017-11-04 10:46:15 +11:00
Andrew Murray
f61b70aa8f Changed EOFError tests 2017-09-30 13:33:06 +10:00
Andrew Murray
78c62727d3 Moved seek frame position check into ImageFile 2017-09-30 13:32:43 +10:00
wiredfool
fd8ee8437b Merge pull request #2315 from radarhere/is_animated
If n_frames is known, then use when determining is_animated
2017-09-29 15:26:22 +01:00
Eric Soroos
a89c4e455d Target mode is I, check pixels 2017-09-20 09:26:40 +00:00
Andrew Murray
4087479464 Added test image 2017-09-20 09:04:48 +00:00
Andrew Murray
9e843a2d9b Changed format of lambda calls 2017-09-01 21:05:40 +10:00
Andrew Murray
371933a597 Added tests 2017-09-01 20:36:51 +10:00
Andrew Murray
c10ad19a2b Changed file opening in tests to use with 2017-09-01 20:03:54 +10:00
Alexander
846f986bc8 Tests for 16bit tiff 2017-08-21 17:10:05 +03:00
Andrew Murray
ce999ff302 If n_frames is known, then use when determining is_animated 2017-08-18 20:20:27 +10:00
wiredfool
1f19c023e1 Merge pull request #2406 from blochl/multiframe_tiff
Allow to save tiff stacks from separate images
2017-06-13 22:30:35 +01:00
wiredfool
c3e041e9e6 Merge branch 'master' into rm-deprecated-fn 2017-06-13 13:32:38 +01:00
Andrew Murray
e8cba27bb1 Changed assert checks to more specific versions 2017-06-03 14:04:54 +10:00
hugovk
c70eb8a128 flake8 2017-05-27 23:55:14 +03:00
hugovk
e002207c5b Remove function deprecated and warning since 3.0 (1 Oct 2015) 2017-05-27 21:55:42 +03:00
wiredfool
f95c158933 added non-exclusive fd for test 2017-04-04 00:27:20 -07:00
wiredfool
06b61f4e5b close the mmap when closing the image #2194 2017-04-03 08:06:59 -07:00
wiredfool
86c1704646 add _close_exclusive_fp_after_load flag 2017-04-03 08:06:58 -07:00
wiredfool
900c5e5bf2 added unix test for fd leak 2017-03-14 23:17:22 +00:00
wiredfool
e4e0e0d2bf Adjusted test to match expected behavior 2017-03-14 23:17:22 +00:00
Marcus Brinkmann
e8122600f6 Test for: Close file handle in TiffImagePlugin when image is closed. 2017-03-14 23:17:22 +00:00
Hugo
cb34b686a5 Merge pull request #1822 from radarhere/unused
Remove unused imports
2017-02-26 10:05:19 +02:00
wiredfool
0ee223aa7a Merge pull request #1390 from radarhere/deprecated_27
Removed use of spaces in TIFF kwargs, deprecated in 2.7
2017-02-22 10:13:45 +00:00
Leonid Bloch
28b818974e Allow to save tiff stacks from separate images
This is a quick solution that will allow to save tiff stacks from
separate images, e.g. from Numpy arrays.
Previously, tiff stacks could be saved only from multiframe images.
This behavior is similar to what is possible now with GIFs.

Note however, that for correct results, all the appended images should
have the same encoder{info,config} properties.

Example:

import numpy as np
from PIL import Image
a = np.ones((100,100,100), dtype=np.uint8)
imlist = []
for m in a:
    imlist.append(Image.fromarray(m))

imlist[0].save("test.tif", compression="tiff_deflate", save_all=True,
               append_images=imlist[1:])

(Should result in a 100-frame, 100x100 tiff stack.)

Signed-off-by: Leonid Bloch <leonid.bloch@esrf.fr>
2017-02-17 00:57:00 +02:00