Commit Graph

40 Commits

Author SHA1 Message Date
wiredfool
1d068b6e0a Check type of items passed into to ImageCms.ImageCmsProfile, fixes #2037 2016-09-26 14:56:00 -07:00
homm
1ba4e9e5ba remove end of file banner from all files 2016-07-10 14:11:28 +03:00
hugovk
934485269c Comments to docstrings (+flake8) 2016-05-24 10:36:14 +03:00
Andrew Murray
3478464ce8 Fixed typo 2016-04-05 20:42:24 +10:00
Andrew Murray
a9efd7ad98 Stopped modules from importing themselves 2015-12-02 16:37:50 +11:00
Andrew Murray
a996033079 Fixed various typos 2015-05-29 14:59:54 +10:00
Andrew Murray
3c7e37d2d7 Replaced old-style classes 2015-05-27 00:07:21 +10:00
Hugo
fd77bcd5a7 Fix rename regression 2014-10-02 12:43:49 +03:00
hugovk
1335006cd7 flake8 2014-08-28 14:44:19 +03:00
wiredfool
6538d971e2 Docs for profile additions 2014-08-02 21:22:51 -07:00
wiredfool
5966278643 Added im.info['icc_profile'] to results for ImageCms.applyTransform 2014-07-29 21:20:11 -07:00
wiredfool
13eb3d667a Added profile.tobytes() for ImageCms Profiles 2014-07-29 20:44:17 -07:00
wiredfool
5eef39f3fb Asserting copyright over lcms2 port 2014-07-14 22:00:29 -07:00
wiredfool
6a928ff6e2 Removed leading docstring 2014-07-14 21:59:42 -07:00
wiredfool
a0cfa466d9 Fixing warnings when building docs 2014-07-14 21:11:00 -07:00
hugovk
27d49b6f27 pep8 2014-06-02 09:57:49 +03:00
hugovk
5cd454bde2 Fix docstring printing from __main__, and pyflakes and some pep8 2014-04-14 12:30:32 +03:00
wiredfool
8ca2cfe75c Use an import error instead of a plain exception 2014-04-03 16:05:02 -07:00
wiredfool
688c8dd538 comment ->autodoc transform 2014-04-03 15:47:57 -07:00
wiredfool
90bbd9ff3e Delayed import error for doc use 2014-04-02 20:09:04 -07:00
wiredfool
b506e2ad44 Fixed ability to create LAB profiles with color temperatures 2013-10-10 22:42:27 -07:00
wiredfool
ce041fd199 moving string functions into python, py27 and py32 now really work the same 2013-10-10 22:12:45 -07:00
wiredfool
95b2434eb2 added accessors for the 4 individual info fields 2013-10-02 16:36:20 -07:00
wiredfool
13860addc4 versioning 2013-10-01 23:22:45 -07:00
Alex Clark
fd29e707e9 Apply @Arfrever patch, fixes #258 2013-06-30 07:04:42 -04:00
wiredfool
310341cec7 merge from master 2013-05-13 09:17:52 -07:00
Sandro Mani
194370d89b Fix some docstrings 2013-04-12 21:54:21 +02:00
wiredfool
7f698a6fc5 PIL imports work in python3/Ubuntu 2013-04-08 20:55:06 -07:00
wiredfool
c774f9ab4c merged pull request #88 to master, resolved conflicts 2013-04-08 20:31:28 -07:00
Alex Clark
44d25a238c Revert "Use relative import for _imagingcms"
This reverts commit 1003e4f7ee.
2013-03-08 18:40:21 -05:00
Alex Clark
fd81ee9336 Fix imports 2013-03-08 17:39:50 -05:00
Christoph Gohlke
1003e4f7ee Use relative import for _imagingcms 2013-03-08 13:34:08 -08:00
Alex Clark
3020c16eaa Fix imports 2013-03-07 11:20:28 -05:00
Brian Crowell
a7e3b2e47b py3k: The big push
There are two main issues fixed with this commit:

* bytes vs. str: All file, image, and palette data are now handled as
  bytes. A new _binary module consolidates the hacks needed to do this
  across Python versions. tostring/fromstring methods have been renamed to
  tobytes/frombytes, but the Python 2.6/2.7 versions alias them to the old
  names for compatibility. Users should move to tobytes/frombytes.

  One other potentially-breaking change is that text data in image files
  (such as tags, comments) are now explicitly handled with a specific
  character encoding in mind. This works well with the Unicode str in
  Python 3, but may trip up old code expecting a straight byte-for-byte
  translation to a Python string. This also required a change to Gohlke's
  tags tests (in Tests/test_file_png.py) to expect Unicode strings from
  the code.

* True div vs. floor div: Many division operations used the "/" operator
  to do floor division, which is now the "//" operator in Python 3. These
  were fixed.

As of this commit, on the first pass, I have one failing test (improper
handling of a slice object in a C module, test_imagepath.py) in Python 3,
and three that that I haven't tried running yet (test_imagegl,
test_imagegrab, and test_imageqt). I also haven't tested anything on
Windows. All but the three skipped tests run flawlessly against Pythons
2.6 and 2.7.
2013-01-10 08:46:56 -06:00
Brian Crowell
31c454b925 py3k: 2to3's "idiom" filter
This is, I guess, a few things the Python devs were just fed up with.

* "while 1" is now "while True"
* Types are compared with isinstance instead of ==
* Sort a list in one go with sorted()

My own twist is to also replace type('') with str, type(()) with tuple,
type([]) with list, type(1) with int, and type(5000.0) with float.
2013-01-10 08:46:53 -06:00
Brian Crowell
83ff0b3b31 py3k: Use relative imports
In py3k, imports are absolute unless using the "from . import" syntax.

This commit also solves a recursive import between Image, ImageColor, and
ImagePalette by delay-importing ImagePalette in Image.

I'm not too keen on this commit because the syntax is ugly. I might go back
and prefer the prettier "from PIL import".
2013-01-10 08:46:48 -06:00
Brian Crowell
5076c35cc5 py3k: print is a function
Seriously, if you didn't know that, you've been in a freaking cave, man.
2013-01-10 08:46:46 -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
Alex Clark
9a640e3157 Forking PIL 2010-07-30 22:52:47 -04:00