Commit Graph

3803 Commits

Author SHA1 Message Date
wiredfool
426c9d8fc2 test failing update 2015-09-11 22:40:38 +01:00
wiredfool
5f9fff0215 Restoring bad exif handling 2015-09-11 22:39:37 +01:00
wiredfool
47a963c2a4 Legacy/versioned interface 2015-09-11 22:39:37 +01:00
wiredfool
9bb4c51629 module level default api level 2015-09-11 22:39:37 +01:00
wiredfool
0c942911d9 fixed the rebase 2015-09-11 22:39:37 +01:00
Antony Lee
c113e8f7cd libtiff's rational precision is limited to C floats. 2015-09-11 22:39:37 +01:00
Antony Lee
ba7b8d1708 Fail on invalid EXIF, reverting ed2cca1. 2015-09-11 22:39:37 +01:00
Antony Lee
1b9b3749ca Reorder OPEN_INFO to cover both endiannesses.
By interleaving little and big-endian entries we make sure entries
exist for both cases.  Some additional entries created when the
big-endian was missing.  I am not sure of what entry to create for the
big-endian, 4-bit case (what is the order of the two entries within the
byte?).
2015-09-11 22:39:37 +01:00
Antony Lee
6309bfe921 Support too long ExtraSamples.
Some programs generate SamplesPerPixel entries in ExtraSamples instead
of SamplesPerPixel-3, cf. #1227.  This is a stopgap measure to support
them.  One could also decide to add generic code to always support
having SamplesPerPixel entries (by dropping the first 3).
2015-09-11 22:39:37 +01:00
Antony Lee
93abbd0caa Restore legacy TIFF API.
To have the old API that always returns tuples, and fractions as pairs,
set the `legacy_api` attribute of the IFD to True.

This should alleviate concerns about backwards compatibility.
2015-09-11 22:39:37 +01:00
Antony Lee
38f7e23495 Include tests of #1113. 2015-09-11 22:35:58 +01:00
Antony Lee
d5b46dce96 Fix MPO support, and Python2.6 support. 2015-09-11 22:34:50 +01:00
Antony Lee
56a3f0f2ab Fix EXIF support. 2015-09-11 22:34:50 +01:00
Antony Lee
974bcc074b Major rewrite of TIFF ImageFileDirectory.
Do not represent scalar tags as 1-element tuples.  Keep tag
type and count information in TiffTags.TAGS.  Normalize data in
ImageFileDirectory.__setitem__: wrap and unwrap tuples as needed,
convert rationals to floats.  (To ensure consistency, make the "tags"
attribute private.)  Interpret byte data as a series of integers rather
than a bytearray (which should only map to the "undefined" type).  On
Python3, if a str is assigned to an "undefined" tag, encode it as ASCII.

Note that a large number of tags have been removed from TiffTags.TAGS
because I do not have time to figure out the type and count of each of
them.  They should be restored before this gets merged in.

This obviously breaks backwards compatibility in a lot of ways...
2015-09-11 22:34:50 +01:00
Antony Lee
aba7a34036 Fix setting of TIFF ExtraSamples tag.
- force cast ExtraSamples to a list.
- fix calls to ImagingLibTiffSetField to include array length.
2015-09-11 22:26:54 +01:00
Hugo van Kemenade
21459e9ab4 Update CHANGES.rst [CI skip] 2015-09-11 14:57:29 +03:00
Hugo van Kemenade
82c29f65d3 Merge pull request #1417 from radarhere/flake8
Flake8 fixes
2015-09-11 14:57:04 +03:00
Andrew Murray
105e963505 Flake8 fixes 2015-09-11 19:28:19 +10:00
Hugo van Kemenade
eecb1ffcad Update CHANGES.rst [CI skip] 2015-09-10 19:12:25 +03:00
Hugo van Kemenade
991829b75a Merge pull request #1414 from wiredfool/pr1360
Catch TypeError in _getexif
2015-09-10 19:11:32 +03:00
Hugo van Kemenade
79dd6ac360 Update CHANGES.rst [CI skip] 2015-09-10 19:08:34 +03:00
Hugo van Kemenade
f631ddb1ef Merge pull request #1416 from wiredfool/pr1309
Fix for UnicodeDecodeError in TiffImagePlugin
2015-09-10 19:07:48 +03:00
Hugo van Kemenade
5a675d63b3 Update CHANGES.rst [CI skip] 2015-09-10 19:07:04 +03:00
Hugo van Kemenade
254201cac6 Merge pull request #1415 from wiredfool/dup_code
Dedup code in image.open
2015-09-10 19:06:35 +03:00
Bogdan Kubala
42b5a85cb4 Fix for UnicodeDecodeError in TiffImagePlugin
Fix for UnicodeDecodeError: ascii codec cannot decode byte while saving a TIFF image

Problem occured while saving TIFF images that contain non-ascii characters in metadata

Manually merged with master by wiredfool
2015-09-10 07:57:47 -07:00
wiredfool
4f705c9636 Update CHANGES.rst 2015-09-10 15:40:28 +01:00
wiredfool
60f44f2dce Merge pull request #1337 from homm/extraneous-jpeg-bytes
Skip any number extraneous chars at the end of JPEG chunks
2015-09-10 15:39:55 +01:00
wiredfool
9cbbab2da5 Dedup code in image.open 2015-09-10 07:17:40 -07:00
Hugo van Kemenade
c8e570b08e Update CHANGES.rst [CI skip] 2015-09-10 17:08:17 +03:00
Hugo van Kemenade
f6d57418cd Merge pull request #1413 from wiredfool/single_threaded_build
Single threaded build for pypy3, refactor. Workaround for #1176
2015-09-10 17:05:20 +03:00
wiredfool
07d95c3861 Added test for typeerror test for gpsexif 2015-09-10 05:32:11 -07:00
wiredfool
587698051f comments for future understanding 2015-09-10 04:36:07 -07:00
wiredfool
0da8bfed62 Updated Changes.rst [ci skip] 2015-09-10 12:19:44 +01:00
wiredfool
c614846fb7 Extend the fix to the other exif seek 2015-09-10 04:19:25 -07:00
wiredfool
1b40b6fd32 Merge pull request #1366 from uploadcare/fix-truncated-regression-from-master
Pillow fails to load truncated images with LOAD_TRUNCATED_IMAGES
2015-09-10 11:59:58 +01:00
wiredfool
525f47a64f Update CHANGES.rst [ci skip] 2015-09-10 11:20:50 +01:00
wiredfool
ec11194bc2 Merge pull request #1406 from merriam/patch-1
Update concepts.rst; clarify 'bands'
2015-09-09 22:12:26 +01:00
wiredfool
6b3666c3d3 Update CHANGES.rst [ci skip] 2015-09-09 22:09:07 +01:00
wiredfool
fc17f31626 Merge pull request #1356 from njones11/master
Add Solaris/SmartOS include and library directories
2015-09-09 22:07:55 +01:00
wiredfool
71a88d4b68 Update CHANGES.rst [ci skip] 2015-09-09 21:46:07 +01:00
wiredfool
43c5f2cd64 Merge pull request #1387 from radarhere/imaging
Improved handling of getink color
2015-09-09 21:43:32 +01:00
wiredfool
772d470f30 Single threaded build for pypy3, refactor. Workaround for #1176 2015-09-09 21:07:03 +01:00
wiredfool
3889ae5d6f Update CHANGES.rst [ci skip] 2015-09-09 16:58:41 +01:00
wiredfool
05666d2ac2 Merge pull request #1402 from cgohlke/patch-1
Disable compiler optimizations for topalette and tobilevel functions for all msvc versions
2015-09-09 16:58:29 +01:00
wiredfool
ab5e812f4d Update CHANGES.rst [ci skip] 2015-09-09 16:54:47 +01:00
wiredfool
5473766490 Merge pull request #1381 from bwrsandman/patch-1
ImagePalette: Add param documentation
2015-09-09 16:52:33 +01:00
wiredfool
a7d4d1e7a5 Merge pull request #1409 from uploadcare/fix-imagingft-not-installed
Skip ImageFont_bitmap test if _imagingft C module is not installed
2015-09-09 16:45:59 +01:00
homm
0b19a86087 skip any number extraneous chars at the end of chunks 2015-09-08 18:05:37 +03:00
homm
5309c8e21e Skip ImageFont_bitmap test if _imagingft C module is not installed 2015-09-08 18:00:00 +03:00
homm
1d236f0262 unused var 2015-09-08 17:43:12 +03:00