Commit Graph

2650 Commits

Author SHA1 Message Date
Dvořák Václav
113d67214c issue #2959: change asserts into raises 2018-03-03 21:08:20 +01:00
Konstantin Kopachev
add2746ac6
Certain corrupted jpegs can result in no data read
On truncated jpeg, decoder can suspend waiting for additional bytes in
buffer. For some input files, decoder suspends on jpeg_start_decompress
stage. If at this point file reader reaches EOF, py code never gets back
to jpeg decoder and we end up with no bytes to result image. This leaves
us with some amount of potentially useful bytes undecoded and thrown
away.
Libjpeg docs suggest that in such situation, more appropriate would be
to add EOI marker to the end of buffer, which will allows decoder
to finish. https://github.com/libjpeg-turbo/libjpeg-turbo/blob/0dd9a2c1fd6c/libjpeg.txt#L1803-L1809
Docs also mention that adding EOI markers is what non-suspending code
does anyway.
2018-02-28 22:15:58 -08:00
Hugo
4936b447f0
Merge pull request #2985 from Metallicow/trim-trailing-space
Trim trailing whitespace
2018-02-27 12:00:15 +02:00
Tim Graham
eb5c52cb17 Fix "invalid escape sequence" warning on Python 3.6+ 2018-02-05 13:53:45 -05:00
Dvořák Václav
c15a0b2fce issue #2959: rename pdfParser.py to PdfParser.py 2018-01-31 00:35:55 +01:00
Dvořák Václav
9be8d669f9 issue #2959: changes based on @hugovk's review 2018-01-31 00:25:04 +01:00
Andrew Murray
aa0ee9feab Rearranged classes into alphabetical order 2018-01-30 20:13:51 +11:00
Metallicow
22a59ac839 Trim trailing whitespace src dir 2018-01-27 00:02:56 -06:00
Andrew Murray
d212808e3d Fixed typo 2018-01-27 16:19:02 +11:00
Dvořák Václav
ede57b91e0 issue #2959: keep file open, add context manager, add methods to support writing, eliminate the passing of file or buffer 2018-01-26 19:07:43 +01:00
Dvořák Václav
78fe32a431 issue #2959: support streams, add some tests 2018-01-26 17:15:38 +01:00
Dvořák Václav
971837cc00 issue #2959: another Py2 bugfix 2018-01-26 16:12:39 +01:00
Dvořák Václav
524addc499 issue #2959: argh, do we really need to support Python 2.x? ;-) 2018-01-26 15:32:54 +01:00
Dvořák Václav
51bed10d4e issue #2959: oops, hopefully fix Python 2.x 2018-01-26 14:54:49 +01:00
Dvořák Václav
53ce9ec4fb issue #2959: fix PdfDict attribute access, text decoding, tests 2018-01-26 13:42:11 +01:00
Dvořák Václav
4d3b13fb08 issue #2959: improve Info setting and dumping 2018-01-26 12:11:10 +01:00
Andrew Murray
c255948860 Fixed typo 2018-01-26 16:52:07 +11:00
Hugo
797d67b9a3
Merge pull request #2974 from wiredfool/webp_leak
Fix memory leak when opening webp files
2018-01-25 10:51:23 +02:00
Dvořák Václav
95f5c8d4ff issue #2959: move pdfParser self tests to Tests directory 2018-01-25 01:12:32 +01:00
Dvořák Václav
84f87471f5 issue #2959: support io.BytesIO objects 2018-01-25 00:44:59 +01:00
Dvořák Václav
13fe1a5ba7 issue #2959: text string decoding, support for Info dict, updated tests 2018-01-25 00:20:18 +01:00
Dvořák Václav
991f832d91 issue #2959: change Py3 detection, fix trailer location for some PDFs 2018-01-24 22:45:37 +01:00
Eric Soroos
0da68dee98 Fix leak opening _webp files 2018-01-24 13:22:51 +00: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
wiredfool
d6973ff50f
Merge pull request #2942 from radarhere/imagecms_remove_main
Removed __main__ code from ImageCms
2018-01-24 10:55:59 +00:00
Andrew Murray
25e72d5856 Fixed typos 2018-01-24 21:54:16 +11:00
Dvořák Václav
a187a361cb issue #2959: add tests and fixes, text encoding, remove remnants of text writing from PdfImagePlugin 2018-01-24 02:28:39 +01:00
Dvořák Václav
65112bad7e issue #2959: fix Python 3.4 not supporting bytes%tuple 2018-01-22 16:39:08 +01:00
Dvořák Václav
6207b44ab1 issue #2959: support appending to existing PDFs 2018-01-18 14:33:11 +01:00
Andrew Murray
1aefc90cb0 Removed __main__ code 2018-01-13 16:41:01 +11:00
Hugo
8f88d6b60a Only extract first Exif segment 2018-01-10 16:00:10 +02: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
Hugo
e92e730597
Merge pull request #2935 from wiredfool/crc
Remove _imaging.crc32 in favor or builtin python crc32 implementation
2018-01-06 20:43:35 +02:00
Andrew Murray
696b3819e8 Combined two excerpt statements 2018-01-06 21:58:05 +11:00
Andrew Murray
b7aab522e1 Added syntax print statements 2018-01-06 21:57:29 +11:00
Andrew Murray
3c73043509 Simplified use of sys.argv 2018-01-06 21:57:29 +11:00
Andrew Murray
59b9d1dc46 Simplified Image.open call 2018-01-06 21:57:29 +11:00
Eric Soroos
4bc33d3e4a Remove _imaging.crc32 in favor or builtin python crc32 implementation 2018-01-05 15:53:50 +00:00
wiredfool
276bb42a62
Merge pull request #2928 from hugovk/mv-tk-to-src
Move Tk directory to src directory
2018-01-05 10:36:07 +00:00
Andrew Murray
4e69b9c553 Skip outline if the draw operation fills with the same colour 2018-01-05 10:59:24 +11:00
Hugo
3916563a1b Move Tk files to src 2018-01-04 09:33:10 +02:00
Andrew Murray
62b2bdf909 Removed unused imports 2018-01-04 14:56:18 +11:00
Andrew Murray
dc5e280785 5.1.0.dev0 version bump 2018-01-02 12:22:22 +11:00
wiredfool
e5bd7eb623 5.0.0 Version Bump 2018-01-01 15:03:06 +00:00
Andrew Murray
6c61de97ad Added GD tests 2017-12-30 19:31:33 +11:00
Andrew Murray
e0c6ca9b61 Corrected info key 2017-12-30 19:31:33 +11:00
Andrew Murray
07a86bacc9 Removed duplicate code 2017-12-30 19:31:33 +11: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