Commit Graph

8731 Commits

Author SHA1 Message Date
Hugo
e62dcc3d48 Add #3886 to release notes and CHANGES 2019-07-01 12:20:08 +03:00
Hugo
a2919f98ff Add #3928 to release notes, and #3928 and #3929 to CHANGES 2019-07-01 10:05:57 +03:00
Hugo
66241cacc1 Add release notes for #3608 and #3861 2019-07-01 09:11:09 +03:00
Hugo
7585136a3d
Merge pull request #3928 from chewi/master
Respect the PKG_CONFIG environment variable when building
2019-07-01 08:31:20 +03:00
Hugo
555e305a60
Merge pull request #3225 from DerDakon/unaligned-access
Use explicit memcpy() to avoid unaligned memory accesses
2019-07-01 08:22:18 +03:00
James Le Cuirot
15cd8eda09
Respect the PKG_CONFIG environment variable when building
This variable is commonly used by other build systems and using it can
help with cross-compiling. Falls back to "pkg-config" as before.
2019-06-30 21:52:58 +01:00
Hugo
290cd170ec
Update CHANGES.rst 2019-06-30 21:51:22 +03:00
Oliver Tonnhofer
2af4026201 Improve encoding of TIFF tags (#3861)
* Improve encoding of TIFF tags

- Pass tagtype from v2 directory to libtiff encoder, instead of
autodetecting type.
- Use explicit types. E.g. uint32_t for TIFF_LONG to fix issues on
platforms with 64bit longs.
- Add support for multiple values (arrays). Requires type in v2
directory and values must be passed as a tuple.
- Add support for signed types (e.g. TIFFTypes.TIFF_SIGNED_SHORT).

Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2019-06-30 21:48:19 +03:00
Hugo
a1eb07f276
Update CHANGES.rst 2019-06-30 13:55:03 +03:00
Hugo
8d4bb339a6
Merge pull request #3780 from nulano/update_py_unicode
Update Py_UNICODE to Py_UCS4
2019-06-30 13:21:46 +03:00
Hugo
12695b8ca3
Merge pull request #3899 from radarhere/pixelsize
Consider I;16 pixel size when drawing
2019-06-30 13:18:46 +03:00
Hugo
4758bca621
Add TIFFTAG_SAMPLEFORMAT to blocklist (#3926)
Add TIFFTAG_SAMPLEFORMAT to blocklist
2019-06-30 10:48:50 +03:00
Andrew Murray
42588a6493 Skip test if libtiff is not installed 2019-06-30 13:26:58 +10:00
Andrew Murray
cc0d70145b Lint fixes 2019-06-30 13:26:58 +10:00
Christoph Gohlke
4a69223db9 Add test for sampleformat corruption 2019-06-30 13:26:58 +10:00
Christoph Gohlke
a70da8112d Add TIFFTAG_SAMPLEFORMAT to blocklist
The SAMPLEFORMAT tag is determined by the image format and should not be copied from legacy_ifd.
2019-06-30 13:26:58 +10:00
Andrew Murray
d11aa4b21d Fixed typo [ci skip] 2019-06-30 07:58:11 +10:00
Andrew Murray
9074eda608
Merge pull request #3778 from radarhere/all_frames
Added ImageSequence all_frames
2019-06-30 07:55:34 +10:00
Hugo
a7bdd6487f
Update CHANGES.rst 2019-06-29 23:09:35 +03:00
Hugo
6459cafba3
Merge pull request #3708 from sircinnamon/master
Create GIF deltas from background colour of GIF frames if disposal mode is 2
2019-06-29 23:08:11 +03:00
Rolf Eike Beer
7a4af2b767 fix unaligned accesses by using memcpy() 2019-06-29 21:04:11 +02:00
Rolf Eike Beer
220bfee19a replace copy operations with memcpy()
This replaces trivial instances where a copy from one pointer to the other
involves no further calculations or casts. The compiler will optimize this to
whatever the platform offers.
2019-06-29 19:30:24 +02:00
Andrew Murray
90d3d37164 Do not presume that the background color index is 0 2019-06-29 23:06:45 +10:00
Andrew Murray
97c15a245c Corrected color table size calculation 2019-06-29 23:02:26 +10:00
Andrew Murray
3e4db05249 Removed code not required by tests 2019-06-29 23:02:17 +10:00
Andrew Murray
c3e982e0c6
Merge branch 'master' into master 2019-06-29 22:59:17 +10:00
Hugo
af0d90a054
Merge pull request #3923 from cgohlke/patch-1
Use unsigned int to store TIFF IFD offsets
2019-06-29 11:02:10 +03:00
Andrew Murray
d2fdb4818c
Fixed wording
Co-Authored-By: Hugo <hugovk@users.noreply.github.com>
2019-06-29 18:02:08 +10:00
Andrew Murray
1abcada1c5 Added release notes [ci skip] 2019-06-29 17:47:55 +10:00
Hugo
d19ed257c4
Merge pull request #3819 from jefferyto/patch-1
Include CPPFLAGS when searching for libraries
2019-06-29 10:27:43 +03:00
Hugo
0e7358a046
Updated TIFF tile descriptors to match current decoding functio… (#3795)
Updated TIFF tile descriptors to match current decoding functionality
2019-06-29 10:27:00 +03:00
Hugo
08c47925d0
Added an image.entropy() method (#3608)
Added an `image.entropy()` method
2019-06-29 10:12:34 +03:00
Hugo
2fe3a39c53
Merge pull request #3925 from radarhere/python38
Split pytest flags
2019-06-29 10:06:32 +03:00
Andrew Murray
6940c1142c Split pytest flags 2019-06-29 15:47:46 +10:00
Andrew Murray
07ec99d545 Updated CHANGES.rst [ci skip] 2019-06-29 08:03:40 +10:00
Hugo
a96482bba0
Pass the correct types to PyArg_ParseTuple (#3880)
Pass the correct types to PyArg_ParseTuple
2019-06-28 21:49:54 +03:00
Hugo
a0191dae1e
Documentation for Image module (#3776)
Documentation for Image module
2019-06-28 19:49:45 +03:00
Hugo
57e3af4afb Fix typo 2019-06-28 18:47:17 +03:00
Christoph Gohlke
59e1328272
Use unsigned int to store TIFF IFD offsets 2019-06-27 15:30:19 -07:00
Christoph Gohlke
129df60c48
Use unsigned int to store TIFF IFD offsets 2019-06-27 15:09:31 -07:00
Christoph Gohlke
2ebde32852
Use unsigned int to store TIFF IFD offsets 2019-06-27 15:07:52 -07:00
Hugo
119d1c927b
Merge pull request #3922 from radarhere/param
Improved parameter documentation
2019-06-28 00:25:41 +03:00
Hugo
372c7c352a
Merge pull request #3703 from jkrshnmenon/master
Add an upper limit for blocks_max in _set_blocks_max
2019-06-27 23:03:25 +03:00
Hugo
b584635a8c
Merge pull request #3912 from radarhere/non_font_bytes
Fixed crash when loading non-font bytes
2019-06-27 22:40:29 +03:00
Hugo
219f277129
Merge pull request #3858 from kulikjak/master
Fix SPARC memory alignment issues in Pack/Unpack functions
2019-06-27 21:27:37 +03:00
Andrew Murray
e319e32cec Improved parameter documentation [ci skip] 2019-06-27 22:53:46 +10:00
Andrew Murray
8b447c4840 Lint fixes 2019-06-26 19:16:36 +10:00
Andrew Murray
1a71faf8ea Removed variable 2019-06-26 19:15:47 +10:00
Alexander Böhn
7b815a5f1d Added an image.entropy() method
This calculates the entropy for the image, based on the histogram.

Because this uses image histogram data directly, the existing C
function underpinning the `image.histogram()` method was abstracted
into a static function to parse extrema tuple arguments, and a new
C function was added to calculate image entropy, making use of the
new static extrema function.

The extrema-parsing function was written by @homm, based on the
macro abstraction I wrote, during the discussion of my first
entropy-method pull request: https://git.io/fhodS

The new `image.entropy()` method is based on `image.histogram()`,
and will accept the same arguments to calculate the histogram data
it will use to assess the entropy of the image.

The algorithm and methodology is based on existing Python code:

* https://git.io/fhmIU

... A test case in the `Tests/` directory, and doctest lines in
`selftest.py`, have both been added and checked.

Changes proposed in this pull request:

* Added “math.h” include to _imaging.c
* The addition of an `image.entropy()` method to the `Image`
  Python class,
* The abstraction of the extrema-parsing logic of of the C
  function `_histogram` into a static function, and
* The use of that static function in both the `_histogram` and
  `_entropy` C functions.
* Minor documentation addenda in the docstrings for both the
  `image.entropy()` and `image.histogram()` methods were also
  added.
* Removed outdated boilerplate from testing code
* Removed unused “unittest” import
2019-06-26 19:15:47 +10:00
Hugo
a79147ff96
Merge pull request #3916 from cgohlke/patch-1
Fix memory leak
2019-06-26 12:09:50 +03:00