Commit Graph

205 Commits

Author SHA1 Message Date
Eric Buehl
26fb0eadad issue warning instead of debug/print 2013-08-20 16:53:55 +00:00
Eric Buehl
7430dc261f be more tolerant of tag read failures
this can occur if the MakerNote has a pointer to outside the EXIF block
2013-08-19 22:51:50 +00:00
Joaquín Cuenca Abela
c68044bf7f Fix IOError when saving progressive JPEGs.
when the jpeg encoder sees the flags optimize or progressive (or progression)
it will write the full image in one shot.

The bufsize needs to be big enough to hold the entire image. The current heuristic
is that the entire compressed image will fit in width * height bytes, but this
heuristic is only applied to save operations with the flag "optimize" and not to
save operations with the flag "progressive".

This patch fixes this oversight.

(Btw, it will probably be a good idea to have a loop that retries with a bigger
bufsize in case this guess is not big enough.)
2013-08-02 14:36:46 +02:00
Yoav Weiss
c117dcae34 Add RGBA support to ImageColor 2013-07-30 16:43:40 +02:00
Martijn Pieters
97f1cd55ee Fix for #304: test for str, not "utf-8".
The code wants to produce a `str` object for the given Python version (which is the right thing to do here).
2013-07-25 18:21:08 +01:00
Michał Nowotka
702fc75ee3 Update _util.py
Fixing missing import.
2013-07-25 17:25:18 +01:00
Felipe Reyes
64cc8f994d Added some missing exif tags 2013-07-24 18:46:21 +00:00
wiredfool
e3e0638a5f Fail fast if there's an import error on _imaging 2013-07-23 10:17:15 -07:00
Freek Dijkstra
d24a419299 Warnings if imaging library has wrong UCS support.
Raise exceptions for unknown errors.
2013-07-23 10:44:27 +02:00
lmollea
763be8614d Fixed windows fallback (wasn't using correct file in windows/fonts) 2013-07-22 14:44:40 +02:00
Felipe Reyes
a560022341 Transformed docstrings of ImageFile and ImageFileIO modules 2013-07-19 15:11:26 +00:00
wiredfool
db49dbf9de Ignore fillorder=2 when reading using libtiff 2013-07-10 22:36:55 -07:00
Felipe Reyes
15eac684c4
Moved Image module docs from comments to docstrings 2013-07-09 15:12:28 -04:00
Alex Clark ☺
675b4d433c Merge pull request #280 from freyes/add-docstrings-Image
Moved PIL.Image.Image docs from comments to docstrings
2013-07-09 09:15:15 -07:00
Felipe Reyes
25b6371b75
Moved PIL.Image.Image docs from comments to docstrings 2013-07-09 10:32:14 -04:00
wiredfool
c575dff007 ignore high ascii characters in string.whitespace 2013-07-08 22:16:25 -07:00
Bernardo Heynemann
b4735f7829 Adding support for metadata in webp images.
Pillow now uses the webpmux library to envelop the webp images in RIFF. This allows for easy support of exif and icc_profile metadata.

Also included tests that verify compatibility with jpeg for exif and icc_profile metadata.

If the user does not have webp with webpmux enabled, pillow will fall back to the previous approach, meaning no exif or icc_profile metadata will be read or written to.
2013-07-04 18:04:07 -03:00
Alex Clark ☺
fd98b0cceb Merge pull request #268 from megabuz/master
Add several TIFF decoders and encoders
2013-07-01 09:14:43 -07:00
Alexey Buzanov
a130c45990 add several TIFF decoders and encoders 2013-07-01 18:45:42 +04:00
Chris Bailey
08d0ec1e93 Generalizing pterk's ZeroDivisionError fix for 1px images 2013-07-01 12:36:46 +01:00
Alex Clark ☺
3207bf372a Merge pull request #266 from cgohlke/remove-test_imagegl
Remove useless ImageGL module
2013-07-01 03:32:27 -07:00
Christoph Gohlke
f042fd6af3 remove useless ImageGL module 2013-06-30 20:39:12 -07:00
Alex Clark
bb1b3a532c Cleanup WS, courtesy of @Arfrever
find * -type f "-(" -name "*.bdf" -o -name "*.c" -o -name "*.h" -o -name "*.py" -o -name "*.rst" -o -name "*.txt" "-)" -exec sed -e "s/[[:space:]]*$//" -i {} \;
2013-06-30 18:42:19 -04:00
Alex Clark
f56facb0c1 Clean up 2013-06-30 15:21:37 -04:00
Alex Clark
c6a95bf8f4 Add files 2013-06-30 14:50:38 -04:00
Alex Clark
fd29e707e9 Apply @Arfrever patch, fixes #258 2013-06-30 07:04:42 -04:00
Alex Clark ☺
19ad775140 Merge pull request #243 from kostya0shift/master
Better support for ICO files
2013-06-29 16:02:11 -07:00
Peter van Kampen
ad0a96c3fa add test & comment 2013-06-23 15:22:31 +02:00
Peter van Kampen
c9faa9caa5 Fix for ZeroDivisionError in ImageOps.fit for image.size == (1,1) 2013-06-23 12:33:23 +02:00
kostya0shift
738a1dd777 Better support for ICO images 2013-06-05 21:01:05 +04:00
wiredfool
aad417dcbe Merge pull request #229 from wiredfool/warnings
Fixing and Suppressing warnings revealed in #227
2013-05-24 08:36:57 -07:00
Alex Clark ☺
5c11e27a97 Merge pull request #228 from d-schmidt/master
working gif optimization
2013-05-24 05:59:23 -07:00
David Schmidt
b66d888b0e adjust the transparency index after successful optimize
skip transparency block if transparent color is not used after optimize
2013-05-24 13:12:40 +02:00
David Schmidt
71b30352d9 limit custom palette size 2013-05-24 13:16:16 +03:00
David Schmidt
a9cb1281f4 fix Python 2 compatibility 2013-05-24 11:55:31 +02:00
wiredfool
2322619372 fixed deprecation warnings for tostring on array.array 2013-05-23 10:33:27 -07:00
David Schmidt
12cea19280 a break 2013-05-23 15:45:11 +02:00
David Schmidt
dad5e86226 fix gif test, fix gif optimization for palette length < 3 2013-05-23 15:24:06 +02:00
Alex Clark ☺
a9fd1f4a94 Merge pull request #225 from wiredfool/pr224
Fix Image.fromarray with NumPy arrays: Supersedes PR #224
2013-05-23 05:51:58 -07:00
David Schmidt
5cd1b9f01e minor addition 2013-05-23 14:31:48 +02:00
David Schmidt
a466b3e099 fixes #211
replace the gif optimization with a working version
2013-05-23 14:06:09 +02:00
wiredfool
baba2810ae version updates 2013-05-21 21:46:36 -07:00
wiredfool
b3752ca053 merge from master 2013-05-21 21:29:58 -07:00
wiredfool
587b9a79d8 ducktype the array_interface obj to see if it provides tobytes or tostring 2013-05-21 21:04:22 -07:00
Matt Davis
1082173030 Fix Image.fromarray with NumPy arrays
Image.fromarray attempts to call a method called `tobytes()` on the passed in object, but NumPy arrays don't have a `tobytes()` method, they have a `tostring()` method. (See http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.tostring.html).

I think this was changed accidentally in a Python 3 compatibility update in which this call was confused with the `tobytes` and `frombytes` methods of Image objects.
2013-05-21 18:35:11 -03:00
Alex Clark ☺
1c3ff8857a Merge pull request #220 from wiredfool/weba_transparent
Transparent WebP Support, #204
2013-05-16 12:49:02 -07:00
Alex Clark ☺
aea9570a2c Merge pull request #221 from wiredfool/jpeg_memoryleak
Jpeg Decode memory leak fix.
2013-05-16 12:42:45 -07:00
wiredfool
158cdbe8db Enabling cleanup
Enabling the cleanup call in ImageFile.load
2013-05-16 08:32:24 -06:00
wiredfool
f6381ba00c Added cleanup method to prevent memory leaks from truncated jpeg decodes 2013-05-15 21:16:37 -07:00
wiredfool
89b6820530 checking raw image length, cleanup and DRY 2013-05-15 17:04:17 -07:00