Commit Graph

145 Commits

Author SHA1 Message Date
Benoit Pierre
4f6c366e75 fix imaging leaks in putdata and getlist 2015-04-16 20:09:39 +02:00
Alex Clark
5cfc34b287 Begin 2.9.0 development with 2.9.0.dev0
Use PEP440 syntax to identify development branch and keep pyroma happy: https://www.python.org/dev/peps/pep-0440/#developmental-releases.
2015-04-02 14:53:49 -04:00
Alex Clark
3f09b8f171 Prep 2.8.1 2015-04-02 10:59:03 -04:00
Alex Clark
860a1dedf1 Prep 2.8.0
No ci skip here because let's see CI run w/new version numbers. I'm starting to think (again) this bump should happen immediately after the release instead of right before the next? But I know @wiredfool had some objection to this at some point. As a compromise, maybe we could change to 2.9.0dev immediately following the release of 2.8.0.
2015-03-27 07:02:02 -04:00
wiredfool
0f05eb287a Version Bump --2.7.0 2014-12-31 20:42:57 -08:00
wiredfool
e16ee15f2c Merge pull request #997 from homm/replace-resize
Replace resize method
2014-11-27 10:26:48 -08:00
wiredfool
8a3302ba5d Merge pull request #961 from homm/fast-box-blur
Merge Fast Gaussian Blur
2014-11-27 10:20:11 -08:00
homm
bc0f896a47 rename Antialias and stretch to resample 2014-11-19 14:36:00 +03:00
homm
1a097d2e02 Merge commit 'e0b94d65bedb4a2124228aa579686a3ba2974d11' into replace-resize 2014-11-19 13:45:04 +03:00
homm
814dd3123e fix comments 2014-11-19 13:15:50 +03:00
homm
41029f0149 make im.stretch strong alias to im.resize.
mark im.stretch as deprecated.
2014-11-19 03:26:17 +03:00
wiredfool
f75c5562c7 Fix #1008, Correct argument to PySequence_Fast_GET_ITEM 2014-11-13 15:33:37 -08:00
homm
aba798af25 replace resize implementation 2014-11-09 21:52:16 +03:00
homm
c22af89ef0 optimize memory usage 2014-11-09 03:05:56 +03:00
homm
c8471bcbda Hide stretch implementation detail in Antialias.c 2014-11-09 03:05:56 +03:00
homm
32079b1dcc make transpose part of public api 2014-11-07 03:37:12 +03:00
homm
36a35e7e27 update box_blur help
fix code style for `!`
fix spelling
2014-10-30 14:19:12 +03:00
homm
274f0a14ba change arguments order and names to match other functions 2014-10-25 17:16:14 +04:00
homm
65173f946b replace gaussian blur with extended box blur implementation 2014-10-25 16:36:41 +04:00
homm
d89c9ab750 Merge branch 'gaussian-refactor' into fast-box-blur 2014-10-25 15:50:57 +04:00
homm
d7d92275f1 Change arguments order and names 2014-10-25 04:28:05 +04:00
homm
516bd90cf7 support for multiple passes with only two transposes 2014-10-19 13:54:13 +04:00
homm
23068e49be allow float radius (without implementation) 2014-10-12 19:24:38 +04:00
homm
d49459f5b2 box blur dummy 2014-10-12 16:30:00 +04:00
homm
84b9f16bfd add effective_scale to all APIs 2014-10-12 03:29:20 +04:00
wiredfool
9634e437ef Version Bump -- 2.6.0 2014-10-01 09:59:00 -07:00
wiredfool
6abc0d2f40 Version Bump - 2.6.0-rc1 2014-09-29 13:14:49 -07:00
wiredfool
2d634d3019 Bump Version/Changelog 2014-08-19 08:52:29 -07:00
wiredfool
c9c80f9da5 Use PySequence_Fast for Image.putdata
Pre-Commit:

$ NOSE_PROCESSES=0 time ./test-installed.py Tests/test_image_putdata.py
...
----------------------------------------------------------------------
Ran 3 tests in 131.623s

OK
131.77user 0.18system 2:14.04elapsed 98%CPU (0avgtext+0avgdata 325632maxresident)k
87376inputs+8outputs (314major+47333minor)pagefaults 0swaps

Post:

$ NOSE_PROCESSES=0 time ./test-installed.py Tests/test_image_putdata.py
...
----------------------------------------------------------------------
Ran 3 tests in 0.534s

OK
0.77user 0.05system 0:00.83elapsed 99%CPU (0avgtext+0avgdata 296352maxresident)k
0inputs+0outputs (0major+21462minor)pagefaults 0swaps
2014-07-23 15:39:24 -07:00
wiredfool
5def1010c7 DRY, moved case inside loop 2014-07-23 15:16:23 -07:00
wiredfool
a5aea42bc9 Use PySequence_Fast* to iterate over the list
Pre commit:

$ NOSE_PROCESSES=0 PILLOW_RUN_KNOWN_BAD=1 time ./test-installed.py Tests/test_image_point.py
..
----------------------------------------------------------------------
Ran 2 tests in 132.056s

OK
131.63user 0.62system 2:12.28elapsed 99%CPU (0avgtext+0avgdata 292176maxresident)k
264inputs+0outputs (2major+451088minor)pagefaults 0swaps

Post:

$ NOSE_PROCESSES=0 PILLOW_RUN_KNOWN_BAD=1 time ./test-installed.py Tests/test_image_point.py
..
----------------------------------------------------------------------
Ran 2 tests in 0.338s

OK
0.52user 0.06system 0:00.59elapsed 98%CPU (0avgtext+0avgdata 257584maxresident)k
176inputs+32outputs (2major+18033minor)pagefaults 0swaps

$ python --version
Python 2.7.6 (2.3.1+dfsg-1~ppa1, Jun 20 2014, 09:27:47)
[PyPy 2.3.1 with GCC 4.6.3]
2014-07-23 14:46:37 -07:00
Alex Clark
4b40839970 Revert "Bump"
This reverts commit 4fe5d520fb.

Hah, foiled by PEP8
2014-07-15 06:15:31 -04:00
Alex Clark
4fe5d520fb Bump
Though I hate the 'dev' designation I want something to indicate master is where development for the next major version happens. I think we've previously disagreed on simply 'X.X.X' so I'm going with 'X.X.Xdev' to see if that is more palatable. :-)
2014-07-15 06:02:34 -04:00
Alex Clark
f8b6163d9f Bump 2.4.0 -> 2.5.0 2014-07-01 07:42:50 -04:00
wiredfool
5b73d8f57b Merge pull request #661 from hugovk/test_imagedraw
Add more ImageDraw tests
2014-06-01 09:09:58 -07:00
hugovk
ae37743ac7 Both kinds of bounding box for arc, chord and pieslice. 2014-05-27 23:31:31 +03:00
Nicolas F
052ea606bf Clean up defines and includes for Windows
1)  Renamed USE_INLINE to PIL_USE_INLINE to avoid conflicts with
    other headers/libraries.

2)  Replace __WIN32__ and WIN32 with _WIN32

3)  Don't define WIN32 when the compiler is MSVC but not on Windows
    Why would you even...

4)  Don't define strcasecmp if you're not even going to use it.

5)  Don't include Windows.h with undefs for compilers newer than
    1998 everywhere.

6)  Don't surpress warnings for MSVC++ 4.0. People still using
    MSVC++ 4.0 deserve it.

7)  Don't include things that are already included in Windows.h
2014-05-09 21:05:30 +02:00
wiredfool
7b4768a9fa Bump all the version numbers 2014-04-02 15:25:46 -07:00
wiredfool
2b81156619 merge to master 2014-03-26 18:46:35 -07:00
Alex Clark
1c4dc75fab Avoid conflicting _expand functions in PIL & MINGW
fixes #538
2014-03-17 10:50:58 -04: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
61fb89ec54 Added a JPEG 2000 encoder. 2014-03-13 18:27:16 +00:00
Alastair Houghton
d6b8f0f666 Added a JPEG 2000 decoder based on OpenJPEG. 2014-03-13 11:46:47 +00:00
wiredfool
540e1e2c68 Added ability to render a bytes object using an old style bitmap font to make it easier to use in Py3k 2014-02-04 21:41:16 -08:00
wiredfool
cacd638187 Unicode handled as Latin-1 for Py3, Strings handled for Py2. 2014-02-04 21:41:16 -08:00
wiredfool
4d32136365 Working in py3k, not in 2.x 2014-02-04 21:41:16 -08:00
wiredfool
e87e0333fb Merge branch 'i16-pixelaccess' into cffi-pixelaccess 2014-01-06 23:22:35 -08:00
wiredfool
5efe737f6f Cffi pixel access object, #248 2014-01-05 10:41:25 -08:00
wiredfool
1dd80b2625 reverted int32 changes 2013-12-30 21:00:32 -08:00
Alex Clark ☺
d48f301d57 Merge pull request #423 from wiredfool/trns-png
Support for PNG tRNS header when converting from RGB->RGBA
2013-12-28 05:56:03 -08:00
wiredfool
77c36d6edc Using uint* for pixel access in mode I;16 and I;32, fixes #452 2013-12-19 21:39:18 -08:00
wiredfool
aa1c0fdfb6 merge from master 2013-12-19 20:48:49 -08:00
Alex Clark
18fe7ee519 Prepare for 2.3.0 release in < 30 days 2013-12-05 05:15:58 -05:00
wiredfool
f987d74695 More Py_ssize_t changes 2013-12-04 22:07:11 -08:00
wiredfool
28f22fc908 Return positive size for > 2gpx images, fixes #436 2013-12-04 20:59:33 -08:00
wiredfool
0356741a29 Now using the rgbT2rgba conversion for L+transparency to RGBA, dropping the palette hack 2013-11-26 13:04:10 -08:00
wiredfool
c546c5a4c0 Added conversion for RGB+Transparency to RGBA that adds an alpha mask corresponding to the transparency value, fixes #421 2013-11-26 12:24:19 -08:00
wiredfool
e60b871b92 whitespace 2013-11-26 12:21:50 -08:00
wiredfool
c6cfd02f8f more consistent 4space indent 2013-11-25 16:25:06 -08:00
wiredfool
3d31bf394b removing libtiff compression based decoder names 2013-11-21 21:10:17 -08:00
wiredfool
65e3bfaf33 added generic libtiff en/decoder instead of each compression version 2013-11-21 20:37:52 -08:00
Alex Clark
3c2496e117 Bump 2013-10-02 13:07:32 -04:00
Alex Clark
cdd130da9b Bump 2013-09-30 06:12:25 -04:00
Alex Clark ☺
e5279a284b Merge pull request #325 from manisandro/bytearray
Fix bytes which should be bytearray
2013-08-29 02:14:49 -07:00
Sandro Mani
2ec21cf5ae Catch incorrect palette sizes 2013-08-28 20:36:39 +02:00
Alexey Buzanov
a130c45990 add several TIFF decoders and encoders 2013-07-01 18:45:42 +04:00
wiredfool
ecc6c081af Use PyCapsule for py3.1, fixes #237 2013-05-28 20:20:35 -07:00
wiredfool
baba2810ae version updates 2013-05-21 21:46:36 -07:00
wiredfool
b0fffd24a4 Merge branch 'master' of https://github.com/python-imaging/Pillow into namespaced 2013-04-09 12:08:13 -07:00
wiredfool
088c752e40 basic sanity check that the version of the _imaging.c and Image.py files are the same 2013-04-08 21:43:15 -07:00
Sandro Mani
07f632194d Make quantization code more portable 2013-04-08 00:52:15 +02:00
David Schmidt
5303f0ea66 added tests to cover save of four different png transparencies 2013-03-26 11:24:07 +01:00
David Schmidt
638889cae0 replaced tabs with space in _imaging.c 2013-03-22 15:22:18 +01:00
Christoph Gohlke
0b8c870d0b Include zlib.h before Imaging.h
Fixes a msvc compile error because various types get redefined
2013-03-13 17:27:24 -07:00
Alex Clark ☺
62bb9aaaa2 Merge pull request #98 from wiredfool/g4_support
G4 Tiff support
2013-03-13 15:41:33 -07:00
wiredfool
7226d0dc26 Merge branch 'master' into g4_support 2013-03-12 22:24:36 -07:00
Oliver Tonnhofer
1401adaefa fix warning for python3
use PyUnicode_FromString instead of PyString_FromString
this warning prevented loading _imaging, somehow
2013-03-12 20:19:08 +01:00
Oliver Tonnhofer
6537ba19c3 backport PIL's PNG/Zip improvements
- add new FASTOCTREE quantizer with alpha support
- make ZIP compress level and type configurable
- support reading/writing PNGs with paletted alpha

source 3637439d51
2013-03-11 20:33:04 +01:00
Oliver Tonnhofer
c60bb09fcd Revert "Added support for PNG images with transparency palette"
This reverts commit 5baa1ac1b8.
2013-03-11 19:02:54 +01:00
wiredfool
5ba6564e26 initial merge of wiredfool/Python-Imaging-Library-G4-Tiff-Support 2013-03-08 19:51:59 -08:00
Alex Clark ☺
fe290d21c6 Merge pull request #83 from cgohlke/patch-4
Use correct Py_BuildValue format for UINT8
2013-03-08 10:59:54 -08:00
Christoph Gohlke
3773a843c6 Use correct Py_BuildValue format for UINT8 2013-03-08 10:16:22 -08:00
Christoph Gohlke
2a7dd808a1 Don't use C99 compound literals
Does not compile with msvc
2013-03-07 22:35:05 -08:00
Alex Clark ☺
5b369a71c5 Merge pull request #54 from cgohlke/patch-2
Fix Windows 64 bit issues
2013-03-05 10:54:08 -08:00
Christoph Gohlke
d711d8ef82 Use Py_ssize_t instead of long 2013-02-13 18:47:32 -08:00
David Schmidt
5baa1ac1b8 Added support for PNG images with transparency palette 2013-02-01 17:52:22 +01:00
Brian J. Crowell
a1c1654594 py3k: inquiry is now lenfunc
This fixes a build warning on 64-bit machines.
2013-01-10 08:47:05 -06:00
Brian Crowell
c8ce29c239 FIX: Handle long values in _imaging getink
This gets the putdata test case to run correctly under 2.6/2.7. It fixes an
issue where the value 0xFFFFFFFF (which is long in old Python) isn't
recognized and putdata tries to parse it as a tuple.

The original fix comes from Christoph Gohlke. It was adapted to work in
both 2.* and 3.*.
2013-01-10 08:46:40 -06:00
Brian Crowell
9631d42b60 py3k: Use "y#" code in PyArg_ParseTuple where we expect byte data
This commit also renames some functions from "fromstring" and the like to
"frombytes". I'll probably need to come back later and update any
references to "string," here or in the docs.

I also noticed that encode allocates some data for certain codecs, but
never frees them. That would be a good bug to fix. I fixed the one where it
outright stole a pointer from Python.
2013-01-10 08:46:38 -06:00
Brian Crowell
af5228896a py3k: Add module initialization and unicode/bytes int/long thunks
This commit:

* Adds Python 3 module initialization functions. I split out the main init
  of each module into a static setup_module function.
* Adds a py3.h which unifies int/long in Python 3 and unicode/bytes in
  Python 2. _imagingft.c unfortunately looks a little kludgy after this
  because it was already using PyUnicode functions, and I had to mix and
  match there manually.

With this commit, the modules all build successfully under Python 3.

What this commit does NOT do is patch all of the uses of PyArg_ParseTuple
and Py_BuildValue, which all need to be checked for proper use of bytes
and unicode codes. It also does not let selftest.py run yet, because there
are probably hundreds of issues to fix in the Python code itself.
2013-01-10 08:46:37 -06:00
Brian Crowell
89e82c5888 py3k: Fix strict aliasing slip-up in _imaging
Python 3 enables C's strict aliasing rules for the first time, which means
you need to be careful about the ways you reference pointers. Here, we're
using a char[4] as an INT32, so we cast between them using a union.
2013-01-10 08:46:36 -06:00
Brian Crowell
804095ecb3 py3k: Use new buffer protocol
Other ports have taken advantage of the fact that Python 3 has wrappers for
the old buffer protocol, but there's a significant disadvantage: you can't
let the buffered object know when you're done with it.

Since Python 2.6 supports the new protocol, we just go ahead and move to
it.
2013-01-10 08:46:35 -06:00
Brian Crowell
9519013466 py3k: Modernize type declarations
This updates several Python type definitions and uses to bring us closer
to Python 3 compatibility. This includes:

* Replacing staticforward and statichere with static. These were a hack for
  old compilers and are not supported/needed anymore.
* Using Py_TYPE() instead of ob_type; ob_type is hidden in Py3.
* Replacing getattr with getters/setters. getattr is sort-of supported in
  Py3, but Py_FindMethod is not. So we just use the newer
  methods/getsetters mechanisms and start using PyType_Ready everywhere.
* Use PyVarObject_HEAD_INIT for types, since types are PyVarObject.
* Use PyMODINIT_FUNC for module initialization functions.

There are some tab/space issues in this commit. I'm set for spaces; the
source is a little schizo.
2013-01-10 08:46:34 -06:00
Tom Payne
e414c66070 Add Image.alpha_composite 2012-12-04 16:44:26 +01:00
Alex Clark
9a640e3157 Forking PIL 2010-07-30 22:52:47 -04:00