Commit Graph

108 Commits

Author SHA1 Message Date
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
78575798d7 py3k: Update exception usage to modern syntax 2013-01-10 08:46:33 -06:00
Brian Crowell
37f22ebfcd py3k: Use string methods instead of string module
First, we go for the obvious stuff. The string module methods are gone in
3.0, so we translate them to the appropriate methods on the string class.
2013-01-10 08:42:49 -06:00
Tom Payne
e414c66070 Add Image.alpha_composite 2012-12-04 16:44:26 +01:00
Corey Richardson
f466def82d Better import of _imaging 2012-06-15 17:39:51 -03:00
Simon Law
5355fea83e Backport fix to split() after open() (regression in 1.1.7).
https://bitbucket.org/effbot/pil-2009-raclette/changeset/fb7ce579f5f9
2012-01-19 15:07:18 -05:00
Stéphane Klein
c144108396 Fix : resize need int values, append int conversion in thumbnail method 2011-07-20 15:49:37 +02:00
Alex Clark
9a640e3157 Forking PIL 2010-07-30 22:52:47 -04:00