Commit Graph

633 Commits

Author SHA1 Message Date
François Boulogne
682ad75759 DOC: fix name in docstring 2014-06-03 16:34:23 -04:00
hugovk
cd967680cb Move dummy test to test/ and run with nosetests 2014-06-03 18:04:27 +03:00
Alex Clark
dc667b1f19 Fix link 2014-06-03 09:01:57 -04:00
hugovk
c9a4272af6 Replace python-imaging with python-pillow (but yet not Coveralls) 2014-06-03 13:02:44 +03:00
hugovk
4c2b3a6afc Merge remote-tracking branch 'upstream/master' into docstring
Conflicts:
	PIL/ImageCms.py
2014-06-02 11:04:29 +03:00
hugovk
27d49b6f27 pep8 2014-06-02 09:57:49 +03:00
wiredfool
60e2eaa5e9 Merge pull request #680 from hugovk/spider
Add tests for SPIDER image files
2014-05-30 08:46:33 -07:00
Chris Sinchok
70a50907c2 This patch allows a JPEG image to be saved with a specific qtables
value (in dictionary format).

Previously, this would throw a TypeError when checking if the qtables
value was actually a preset. By adding an isStringType check, we can
avoid this error.
2014-05-28 17:21:58 -05:00
Alastair Houghton
87d10dcaeb Oops. Fixed a silly mistake. 2014-05-27 15:05:25 +01:00
Alastair Houghton
1011e51083 Added support for OpenJPEG 2.1. 2014-05-27 12:43:54 +01:00
hugovk
d7ed249b29 Remove redundant commented code [CI skip] 2014-05-27 14:39:33 +03:00
hugovk
fd05e9c756 Test decompression bomb warnings 2014-05-27 12:40:52 +03:00
hugovk
b853696ad5 Remove stray debug print 2014-05-27 12:18:56 +03:00
hugovk
a0d8e5cb33 Set limit to to around a quarter gigabyte for a 24 bit (3 bpp) image 2014-05-27 12:10:10 +03:00
hugovk
eacbd7b04a pep8/pyflakes 2014-05-26 21:56:40 +03:00
hugovk
5217a523d6 Make sure nvalues is int and not float for Python 3 2014-05-26 21:18:48 +03:00
hugovk
5f9cad1a8e pyflakes 2014-05-26 20:15:48 +03:00
hugovk
29388f8395 Remove redundant comment [CI skip] 2014-05-26 16:26:42 +03:00
hugovk
35f1f4d8fa Change exception into a warning 2014-05-26 16:25:15 +03:00
hugovk
b7e5c27696 Remove temporary print 2014-05-24 17:52:48 +03:00
wiredfool
26b0f20763 Merge pull request #669 from wiredfool/tiff_compression
Use libtiff for writing any compressed tiff files
2014-05-24 13:16:57 +01:00
wiredfool
a91387e9dd Merge pull request #673 from wiredfool/pickling
Support for pickling Image objects
2014-05-24 13:14:42 +01:00
wiredfool
3f18e0adfe Merge pull request #619 from eliempje/master
Bugfix: EPS thumbnail failed
2014-05-24 13:09:25 +01:00
wiredfool
301cff0355 Merge pull request #670 from hugovk/png_clean
Rename variables not to use built-in function names
2014-05-24 12:46:12 +01:00
wiredfool
cd17b66541 Merge pull request #647 from hugovk/house
Fix for junk JPEG data
2014-05-23 00:06:09 +01:00
hugovk
14c2f86873 Rename bytes variable as read_bytes to avoid the built-in function name. 2014-05-21 21:33:49 +03:00
hugovk
d594c0241a Rename len variables as length to avoid the built-in function name. 2014-05-21 20:45:02 +03:00
hugovk
8a7974c288 Use bytes for Python 3. It's just an alias to str in Python 2. 2014-05-21 14:35:29 +03:00
wiredfool
3b227d1a05 Merge from current master 2014-05-20 11:47:53 -07:00
wiredfool
edd75ceb91 Use libtiff for writing any compressed tiff files, Fixes #659, #431 2014-05-20 10:15:01 -07:00
wiredfool
6ab636fb5a Doc formatting fix 2014-05-20 09:27:56 -07:00
wiredfool
9a6e8f8e9d Noted previous default 2014-05-20 09:21:12 -07:00
wiredfool
8d4a77a939 merge from master 2014-05-20 08:58:09 -07:00
wiredfool
88d74883bb remove redundant transparency check 2014-05-19 14:12:43 -07:00
hugovk
0938145e57 Move to an elif clause of the if in line 778, as it's just another combination of mode,self.mode under the master transparency condition 2014-05-19 10:04:56 +03:00
hugovk
ca7608f1d5 Possible fix for #664 2014-05-17 20:36:17 +03:00
hugovk
ce2955ec71 Throw an exception when an opened image is larger than an arbitrary limit 2014-05-14 18:04:18 +03:00
hugovk
3ff73688fe pep8 and pyflakes 2014-05-12 14:56:55 +03:00
hugovk
8cda5170c8 Fix bytes/str and reinstate test 2014-05-12 14:45:54 +03:00
hugovk
c37aa0a9ca Fix tostring()/tobytes() warning and reinstate test 2014-05-12 14:30:03 +03:00
hugovk
74514fa1f5 Some pep8 and pyflakes cleanup 2014-05-10 12:34:36 +03:00
hugovk
22a370afc2 Fix 12-year-old FIXME 2014-05-10 11:46:53 +03:00
wiredfool
54173d2c67 Cherry-pick of portions of patch a500ca1393, many shortcut ops added, no functional changes 2014-05-09 21:36:15 -07:00
wiredfool
adc17c156d Merge branch 'master' of https://github.com/dvska/Pillow into cleanup 2014-05-09 20:49:25 -07:00
eliempje
f7817b93cf Merge pull request #2 from hugovk/eps_tests
Tests for EPS thumbnail bugfix (including thumbnail bugfix)
2014-05-08 18:09:13 +02:00
eliempje
d3192dd930 Update EpsImagePlugin.py
FIXED issue #302: https://github.com/python-imaging/Pillow/issues/302
EPS file can have binary preview. Header is now also read binary.

Also fix for resizing EPS. Resolution is now 2 dimensional and dependend on bbox and size.
2014-05-07 13:36:35 +02:00
hugovk
f4071ade0a pep8 2014-05-05 22:41:09 +03:00
hugovk
e835dd70a1 Discard first byte if not 0xFF (for issue #630) 2014-05-05 22:09:57 +03:00
hugovk
f1cc194955 Don't compare pyaccess in __eq__ 2014-04-26 21:23:45 +03:00
hugovk
2a6f2c5442 Add __eq__ and __ne__ to Image to be able to test image equality when pickling. Pickle more data. 2014-04-26 19:43:53 +03:00
hugovk
6c938b784b Remove duplication by calling __init__() (Suggested by @ulope: 6802c12f89 (commitcomment-6125853)) 2014-04-26 17:18:29 +03:00
hugovk
6802c12f89 Initialise object when unpickling 2014-04-25 09:01:16 +03:00
hugovk
a3edb45f08 pep8 2014-04-22 09:23:34 +03:00
hugovk
adfbe8323a Tests and partial implementation of pickling (#629) 2014-04-22 08:54:16 +03:00
wiredfool
5ca5652d0b Merge pull request #551 from wiredfool/with
Image.close, Context manager support
2014-04-17 22:20:30 -07:00
wiredfool
8c6a4c0299 Docs changes for close/context manager 2014-04-17 21:53:49 -07:00
wiredfool
ca36b6cd36 Merge pull request #606 from wiredfool/pgm
16 bit Read/Write PGM support.
2014-04-17 12:22:18 -07:00
wiredfool
1945fd6cb4 Merge pull request #618 from hugovk/master
Add version 0.30 of OleFileIO (2014-02-04)
2014-04-17 12:19:03 -07:00
Dmitry Selitsky
d5b09509be logic typo fix 2014-04-16 16:07:43 +03:00
hugovk
a97e5039d8 Remove unused _binary import (plus flake8) 2014-04-14 12:51:12 +03:00
hugovk
5cd454bde2 Fix docstring printing from __main__, and pyflakes and some pep8 2014-04-14 12:30:32 +03:00
eliempje
2cd6d416b2 Bugfix: EPS thumbnail failed
EPS thumbnail failed to resize correctly due to incorrect resolution argument (should be a function of the image size and bounding box). This is fixed in this commit.
2014-04-12 13:38:39 +02:00
Hugo
be201bf4f3 Undo cleanup reversal
"Just pointing out that this bit is actually reversing a recent cleanup in Pillow. See commit 923018d and PR #474. I guess that cleanup was merged into Pillow after I did my merge from Pillow to PL’s fork."
https://github.com/python-imaging/Pillow/pull/618#discussion_r11559186
2014-04-12 12:43:24 +03:00
hugovk
43ec928d33 version 0.30 2014-02-04 2014-04-11 14:03:32 +03:00
Hijackal
029a4a5079 Add specific 32-bit float tiff format
We regularly use this format to store 32bit floats and I would like to see it handled by clean Pillow installations without having to add it on every system I use.
2014-04-10 15:52:53 +02:00
wiredfool
3d352329f4 Use the deferred error to provide a logical exception on access to a closed image 2014-04-08 23:43:13 -07:00
wiredfool
b27ef76468 Rename import_err to something more general 2014-04-08 23:42:34 -07:00
wiredfool
1256fb496e Merge from master 2014-04-08 23:22:40 -07:00
wiredfool
398450a5e4 Fix failing tests, turns out I is different than L 2014-04-08 22:44:24 -07:00
wiredfool
88e235f3f5 sanity check on ascii integers 2014-04-08 22:43:57 -07:00
wiredfool
213cec00cb consistency 2014-04-07 22:24:48 -07:00
wiredfool
327ea209b8 Write support, fixes #602 2014-04-07 22:23:04 -07:00
wiredfool
f5ba642b5e Read support for 16 bit pgm file 2014-04-07 22:12:33 -07:00
wiredfool
86d5c5c389 Have the tempfile use a suffix with a dot 2014-04-07 16:01:49 -07:00
wiredfool
844ed441de Add the suffix if it's not there, not if it is 2014-04-07 15:59:33 -07:00
Michal Čihař
07650be832 Fix variable name
Wrong variable name was used for transparency manipulations.
2014-04-07 17:36:36 +02:00
wiredfool
82d7524add made has_ghostscript a method, using it from test_imagefile 2014-04-04 13:33:54 -07:00
wiredfool
8ca2cfe75c Use an import error instead of a plain exception 2014-04-03 16:05:02 -07:00
wiredfool
688c8dd538 comment ->autodoc transform 2014-04-03 15:47:57 -07:00
wiredfool
90bbd9ff3e Delayed import error for doc use 2014-04-02 20:09:04 -07:00
wiredfool
7b4768a9fa Bump all the version numbers 2014-04-02 15:25:46 -07:00
wiredfool
0d7115a5a4 Merge from master 2014-03-30 09:14:04 -07:00
Alex Clark ☺
6e6bc21ba1 Merge pull request #565 from al45tair/icns-support
Improved icns support
2014-03-30 07:30:14 -04:00
Alex Clark ☺
0baa82ac69 Merge pull request #580 from wiredfool/libtiff-fd-leak
Fixes libtiff leaking open files
2014-03-29 18:25:57 -04:00
Alastair Houghton
172e46def8 Fixed a silly mistake. 2014-03-28 09:30:16 +00:00
Alastair Houghton
5dd67abd71 Merge branch 'master' into icns-support 2014-03-28 09:15:20 +00:00
Alastair Houghton
5aac5b7eff Made JPEG2K support for files conditional on its inclusion in pillow build. Added a JPEG2K icon test. 2014-03-28 09:09:55 +00:00
wiredfool
937ae7790f Renamed variables from reused single letter confusing names to something halfway descriptive 2014-03-27 22:19:39 -07:00
wiredfool
9552d9bc66 close the fd, if possible. Fixes #526 2014-03-27 22:18:40 -07:00
wiredfool
3e24bc684d Merge pull request #578 from wiredfool/xrange
Python3 issues in JpegImagePlugin
2014-03-27 20:52:07 -07:00
wiredfool
a2800ba9a1 Additional commits from pr 2014-03-27 20:00:10 -07:00
wiredfool
e07b0d8ac9 don't use xrange, has_key, fixes #577 2014-03-27 16:40:44 -07:00
Alastair Houghton
0eccdf534d Merge branch 'master' into icns+jp2k 2014-03-27 08:38:02 +00:00
Alastair Houghton
18d6432036 Fixed some problems with the reduce option, as well as a number of warnings from GCC. 2014-03-27 08:35:38 +00:00
wiredfool
2b81156619 merge to master 2014-03-26 18:46:35 -07:00
Alastair Houghton
cbe7e93bdd Merge branch 'icns-support' into icns+jp2k 2014-03-26 11:18:26 +00:00
Alastair Houghton
3655a0ecce Fixed a pre-existing Python 3 bug. 2014-03-26 11:12:14 +00:00
Alastair Houghton
5904ac1718 Added some tests and a couple of icns files. 2014-03-26 10:49:39 +00:00
wiredfool
8adbaf8098 Better tests, fixes for leaking RGB->P transparency 2014-03-26 00:01:10 -07:00
wiredfool
8ea903ec59 Transparency conversion for L, RGP and P images, fixes #510 2014-03-25 23:34:41 -07:00
wiredfool
abebac25cc Sane quantize defaults for RGBA->P, fixes #544 2014-03-25 21:42:40 -07:00
Alastair Houghton
18f12b30aa The JPEG plug-in will seek the stream if it's an fd, so change to using an io.BytesIO. 2014-03-24 18:04:37 +00:00
Alastair Houghton
5f77c39090 Added JPEG 2000 support for .icns files. 2014-03-24 17:24:49 +00:00
Alastair Houghton
8eec69d39e Merging JPEG 2000 support with .icns plugin. 2014-03-24 17:22:59 +00:00
Alastair Houghton
9b5bc2012f Removed print statements. 2014-03-24 17:13:14 +00:00
Lars Buitinck
61975dd8ad more detailed error messages from Image.py 2014-03-24 17:49:19 +01:00
Alastair Houghton
299c278e66 Improved icns support 2014-03-24 16:10:23 +00:00
Alastair Houghton
ac8ebccfa6 Added tests and fixed a few bugs that the tests threw up. 2014-03-19 12:16:14 +00:00
wiredfool
45ce1e04a7 Docstring/comment fixes [skip ci] ref #534 2014-03-17 13:29:44 -07:00
wiredfool
196a48b4fd added context manager support 2014-03-17 13:17:34 -07:00
Alex Clark ☺
878d0ca51d Merge pull request #512 from vadmium/pl
Merge from Philippe Lagadec’s OleFileIO_PL fork
2014-03-17 10:41:26 -04:00
Alex Clark ☺
da3ab720f4 Merge pull request #534 from homm/fix-getcolor-rgba
Fix ImageColor.getcolor
2014-03-17 10:20:40 -04:00
Alex Clark ☺
054eb71bc6 Merge pull request #525 from wiredfool/ico_parser
Make ICO files work with the ImageFile.Parser interface, fixes #522
2014-03-17 10:14:03 -04:00
Alex Clark
0e9f4c6c60 Merge branch 'dschmidt_palette_513' of https://github.com/wiredfool/Pillow into wiredfool-dschmidt_palette_513 2014-03-17 09:48:24 -04:00
Alex Clark
c1d44980b8 Merge branch 'pcx' of https://github.com/wiredfool/Pillow into wiredfool-pcx 2014-03-17 09:38:38 -04:00
wiredfool
1e331e3e6a Removed tempfile.mktemp, fixes CVE-2014-1932 CVE-2014-1933, debian bug #737059 2014-03-14 15:56:41 -07:00
Alastair Houghton
6840278b7d Removed print statement. 2014-03-14 16:49:29 +00:00
Alastair Houghton
9a1b6966b5 Added precinct size option. Also added the jp2klib_version symbol on the _imaging module. 2014-03-14 15:40:30 +00:00
Alastair Houghton
cb1f990a92 Added seek support to make writing jp2 files work. Also added support for directly using an fd rather than relying on the Python loop, if we have a real fd. 2014-03-14 11:21:08 +00:00
Alastair Houghton
61fb89ec54 Added a JPEG 2000 encoder. 2014-03-13 18:27:16 +00:00
Alastair Houghton
5b22b715ce Fixed some bugs. 2014-03-13 12:29:03 +00:00
Alastair Houghton
7dba77364a Fixed rounding. 2014-03-13 11:57:47 +00:00
Alastair Houghton
d6b8f0f666 Added a JPEG 2000 decoder based on OpenJPEG. 2014-03-13 11:46:47 +00:00
wiredfool
414e887726 Merge Changes from Master 2014-03-04 22:43:19 -08:00
wiredfool
f8ce951a2d Merge Changes from master 2014-03-04 22:41:36 -08:00
wiredfool
a77ee2d8c5 Fix test failure when optimizing the palette on mode L gifs 2014-03-04 21:44:32 -08:00
David Schmidt
6457eed2cb overwrite redundant Image palette with new ImageCore Palette after quantize, fixes #513 2014-03-04 21:44:32 -08:00
David Schmidt
232c175bd9 fixes #513 2014-03-04 21:44:32 -08:00
David Schmidt
93a8bc9bd3 * fix palette handling for converted gifs
* fix gif optimization
* better auto convert paramter for gif save
2014-03-04 21:44:32 -08:00
wiredfool
89cb3c7e85 Use even stride when saving odd sized .pcx files 2014-03-03 23:05:50 -08:00
wiredfool
fe5372c867 Debug Loging 2014-03-03 20:29:14 -08:00
homm
68a64e8071 fix ImageColor.getcolor in cases:
- color is rgba, mode is RGB
- mode is LA
2014-03-03 16:10:34 +04:00
wiredfool
aa864f4ab4 Merge pull request #533 from wiredfool/fix_528
Fix for  transparency = 0 in PNG mode P images
2014-02-28 16:34:32 -08:00
David Schmidt
37f4aea0d0 fixes #529
doc fix
2014-02-25 09:56:49 +01:00
David Schmidt
f848993c89 fixes #528
Accept 0 as transparency value.
2014-02-25 09:50:42 +01:00
wiredfool
36323d1140 Make ICO files work with the ImageFile.Parser interface, fixes #522 2014-02-16 20:58:06 -08:00
Alex Clark ☺
cbdd639838 Merge pull request #504 from e98cuenc/highquality
Improve heuristic used when saving progressive and optimized JPEGs with high quality values.
2014-02-10 07:23:44 -05:00
Martin Panter
99e7599ce2 OleFileIO: Add MAGIC constant to __all__
This is used by other modules in Pillow.
2014-02-04 04:10:19 +00:00
wiredfool
c9955628e2 Merge from master 2014-01-31 21:38:34 -08:00
wiredfool
88d0e6080a Fixed DOS with invalid BMP size entries 2014-01-31 21:33:24 -08:00
wiredfool
de1b02dc8c Merge pull request #508 from wiredfool/no-icc-profile
Fix crash on saving PNG when icc_profile is None
2014-01-31 14:03:21 -08:00
wiredfool
8a86364885 Merge branch 'no-icc-profile' of github.com:wiredfool/Pillow into no-icc-profile 2014-01-31 13:59:38 -08:00
wiredfool
3ea93e5de5 Merge branch 'bmp_test' of github.com:wiredfool/Pillow into bmp_test 2014-01-31 13:52:17 -08:00
wiredfool
288a563d1a merge from master 2014-01-31 13:45:31 -08:00
Alex Clark ☺
5750d5d6ef Merge pull request #474 from sciunto/bool
Maint: minor patch on booleans + travis
2014-01-31 13:16:38 -08:00
Martin Panter
caa609c438 Do away with @functools.total_ordering to restore Python 2.6 support
* Manually implement __ne__() and __lt__()
* __gt__() and __ge__() not needed due to operator reflection
2014-01-31 01:32:46 +00:00
Martin Panter
704ed76229 Update documentation for Python 3 2014-01-30 23:47:12 +00:00
Martin Panter
a6fd013a77 Implement rich comparison using @total_ordering (2.7+, 3.2+) 2014-01-30 23:38:04 +00:00
Martin Panter
5143df8561 Use range() rather than xrange(), for Python 3 compatibility 2014-01-30 23:38:04 +00:00
Martin Panter
6977b592e3 Port more stuff to Python 3, dropping some pre-2.6 support 2014-01-30 23:38:04 +00:00