Commit Graph

33 Commits

Author SHA1 Message Date
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