Commit Graph

113 Commits

Author SHA1 Message Date
Andrew Murray
ebd3c47425 When saving, allow alpha differences to indicate different frames 2023-04-29 15:02:11 +10:00
Andrew Murray
59d67fa68a Only call PyTuple_Check once in getink 2023-03-31 21:59:06 +11:00
Andrew Murray
d84e227204 Fixed warning that variable may be uninitialized 2023-03-31 21:52:37 +11:00
Hugo van Kemenade
f191666a91
Merge pull request #6999 from radarhere/null
Handle failure from PyDict_New or PyList_New
2023-03-31 08:32:13 +03:00
Andrew Murray
0ea1184bcf
Free additional variables
Co-authored-by: Ondrej Baranovič <3819630+nulano@users.noreply.github.com>
2023-03-30 07:54:01 +11:00
Andrew Murray
d5d830dd00 Merge branch 'main' into bgr32 2023-03-25 23:45:48 +11:00
Andrew Murray
dc79a09d62 Merge branch 'main' into null 2023-03-22 18:56:52 +11:00
nulano
1a11ba662c
do not insert null into dict 2023-03-21 22:05:26 +00:00
Andrew Murray
6328662248 PyUnicode_* may return NULL 2023-03-20 17:36:55 +11:00
Andrew Murray
11d100ce5d Support creating BGR;15, BGR;16 and BGR;24 images 2023-03-20 00:30:10 +11:00
Andrew Murray
01cdfb6b27 Removed duplicate calls to PyTuple_GET_SIZE 2023-03-19 23:29:17 +11:00
Andrew Murray
b3d7823740 Decrement reference count 2023-03-12 00:11:48 +11:00
Andrew Murray
c63b0ca210 Decrement reference count 2023-03-11 18:32:43 +11:00
Andrew Murray
929dbba834 Handle failure from PyDict_New or PyList_New 2023-03-10 17:37:06 +11:00
Andrew Murray
a4965a7eaa Split into x and y errors 2023-03-01 22:06:40 +11:00
Andrew Murray
b84c29a035 Raise an error if co-ordinates are incorrectly ordered 2023-03-01 11:22:35 +11:00
Hugo van Kemenade
826c98156c Remove unused listwindows functions for Windows/3.12 support 2023-02-11 16:36:52 +02:00
Andrew Murray
08816f43ae Added support for I;16 modes in putdata() 2022-12-26 18:35:24 +11:00
Eric Soroos
41987cffad Fix compiler error:
src/_imaging.c:1842:17: warning: ‘ImagingTransform’ accessing 64 bytes in a region of size 48 [-Wstringop-overflow=]
       1842 |         imOut = ImagingTransform(
            |                 ^~~~~~~~~~~~~~~~~
       1843 |             imOut, imIn, IMAGING_TRANSFORM_AFFINE, 0, 0, xsize, ysize, a, filter, 1);
            |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      src/_imaging.c:1842:17: note: referencing argument 8 of type ‘double *’
2022-11-03 22:57:39 +01:00
Andrew Murray
948c064b28 Allow getpalette() to return less than 256 colors 2022-02-16 09:56:13 +11:00
Andrew Murray
9cdb0508b6 Attach RGBA palettes from putpalette() when suitable 2022-02-14 20:28:47 +11:00
Andrew Murray
e0d5417bcd Raise an error if sequence is not flattened 2021-12-28 09:38:41 +11:00
Andrew Murray
e9294d890f Accept float values for putdata() in Python 3.10 2021-12-28 09:38:41 +11:00
Andrew Murray
90a52d3c0d Added width argument to polygon 2021-11-16 22:02:54 +11:00
Andrew Murray
aa4489c993 Keep palette the same length 2021-06-19 09:31:46 +10:00
Hugo van Kemenade
affa059e95
Merge pull request #5504 from radarhere/tuple_size
Added specific error messages when ink has incorrect number of bands
2021-05-23 17:18:38 +03:00
Andrew Murray
a1412681ff Added specific error messages when ink has incorrect number of bands 2021-05-19 20:19:57 +10:00
Andrew Murray
ff0c0afb2c Use PyTuple_GET_SIZE since variable is known to be a tuple 2021-05-19 19:51:45 +10:00
Andrew Murray
29c6f53e99 Use METH_NOARGS when no arguments are required 2021-05-11 20:19:17 +10:00
Andrew Murray
f2ee5d6697 Use METH_VARARGS flags 2021-05-11 20:16:44 +10:00
Hugo van Kemenade
683affa29c
Merge pull request #5206 from radarhere/numpy 2021-03-31 17:46:32 +03:00
Andrew Murray
685e951182 Removed unused C code 2021-01-30 11:23:24 +11:00
Andrew Murray
bdbf1694fc Allow PixelAccess to use Python __int__ when parsing x and y 2021-01-14 21:31:25 +11:00
Andrew Murray
cf190a3c2f PyModule_AddObject fix for Python 3.10 2021-01-09 12:17:57 +11:00
Andrew Murray
46b7e86bab Format with ClangFormat 2021-01-03 14:17:51 +11:00
Andrew Murray
26e5929617 Fixed comparison between int and unsigned long 2020-12-22 16:06:44 +11:00
Andrew Murray
0eddc82157
Merge pull request #5108 from cgohlke/patch-1
Fix dereferencing potential null pointer
2020-12-22 08:26:48 +11:00
Christoph Gohlke
d1e706d756
return ImagingError_MemoryError 2020-12-19 19:42:29 -08:00
Andrew Murray
b7fb39fff8 Use ImagingError_MemoryError NULL return value 2020-12-20 13:00:16 +11:00
Andrew Murray
75542fea6d Replaced PyErr_NoMemory with ImagingError_MemoryError 2020-12-20 13:00:10 +11:00
Christoph Gohlke
7673cb7549
Fix dereferencing potential null pointer 2020-12-19 14:57:55 -08:00
Hugo van Kemenade
f9852c0381
Merge branch 'master' into fix-imagingHinclude 2020-10-14 14:50:36 +03:00
Hugo van Kemenade
309cb9e5c4
Merge pull request #4927 from radarhere/tuple 2020-10-12 14:40:22 +03:00
Hugo van Kemenade
15c339470d
Merge pull request #4523 from xtsm/ellipse
Implemented another ellipse drawing algorithm
2020-10-11 18:04:34 +03:00
Andrew Murray
e01081bf8b
Improved error message
Co-authored-by: nulano <nulano@nulano.eu>
2020-09-22 08:36:29 +10:00
Andrew Murray
27c0747518 Allow tuples with one item to give single color value in getink 2020-09-20 14:23:05 +10:00
Axel Huebl
f79379ed7c Imaging.h: confusion with system
The file `libImaging/Imaging.h` gets installed flat on
Ubuntus into the public Python includes.

When building a newer version of Pillow from source and
hinting the Python includes "too early" in includes, e.g.
in package managers, this can confuse the two files and
pick up the external file over the internal one. With
different versions, this mismatch can lead to build errors,
e.g. undefined macros.

The most robust way to avoid this is to pre-fix the internal
include accordingly, so that the relative path to the including
file has to match as well.
2020-09-17 18:06:45 +10:00
nulano
4bb78d53a3 give proper error message for invalid putpixel color type 2020-08-20 00:01:03 +02:00
Stanislau Tsitsianok
7dedb1402f
Merge remote-tracking branch 'upstream/master' into ellipse 2020-06-29 23:31:25 +03:00
Stanislau Tsitsianok
96f69eb287
Replaced drawing algorithm for arcs, chords and pies 2020-06-29 17:21:53 +03:00