Commit Graph

39 Commits

Author SHA1 Message Date
Marcus Brinkmann
31070a9165 Fix chromaticity attribute in CmsProfile. 2016-03-07 18:42:49 +01:00
Marcus Brinkmann
87603266ad Give much more details about ICC profiles. 2016-03-05 04:40:24 +01:00
Andrew Murray
6bd7e7f02d Removed trailing whitespace 2015-10-11 21:24:35 +11:00
Andrew Murray
9e24ae023d Fixed various typos 2015-06-08 01:17:49 +10: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
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
cgohlke
deb44ddd52 BLD: Fix msvc build error C1189: "No Target Architecture" 2013-12-29 18:54:07 -08:00
wiredfool
bde4613843 format including the padding byte 2013-10-15 22:06:30 -07:00
wiredfool
1c3932e89f Added LAB mode, core dumped 2013-10-10 23:27:34 -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
c5216d79c2 Py3 same test results as py2 2013-10-02 20:26:34 -07:00
wiredfool
ce4671c14c better white point calculation, but still questionable 2013-10-02 16:35:07 -07:00
wiredfool
2c46984ed1 one more condition on the name field 2013-10-02 16:34:46 -07:00
wiredfool
bded4abc9d profile name mostly working, profile info failing still since it's complicated sfuff that's not easily exposed in lcms2 2013-10-02 16:13:07 -07:00
wiredfool
16eed66095 requiring lcms > 2 2013-10-02 14:26:47 -07:00
wiredfool
135c47e82a try the ascii version of cmsGetProfileInfo 2013-10-01 23:22:37 -07:00
wiredfool
88c584c5de product attributes 2013-10-01 22:54:39 -07:00
wiredfool
9c0f4a131f LCMSBOOL -> cmsBool 2013-10-01 22:24:41 -07:00
wiredfool
a2fd0e99e2 createprofile 2013-10-01 22:22:56 -07:00
wiredfool
db4f11a05c DWORD -> cmsUInt32Number 2013-10-01 22:16:59 -07:00
wiredfool
e5a6615ad2 DWORD -> cmsUInt32Number 2013-10-01 22:07:35 -07:00
wiredfool
af1e525914 ic -> cms prefix change 2013-10-01 22:03:52 -07:00
wiredfool
c592845bd4 Error handling has changed, methods return null on error 2013-10-01 21:55:59 -07:00
nu774
c09a0fd815 issue328: _imagingcms.c: include windef.h to fix build issue on MSVC 2013-09-27 20:16:34 +09:00
Alex Clark
bb1b3a532c Cleanup WS, courtesy of @Arfrever
find * -type f "-(" -name "*.bdf" -o -name "*.c" -o -name "*.h" -o -name "*.py" -o -name "*.rst" -o -name "*.txt" "-)" -exec sed -e "s/[[:space:]]*$//" -i {} \;
2013-06-30 18:42:19 -04:00
Mikhail Korobov
c59c6609f3 Restore fromstring & tostring aliases in 3.x 2013-03-07 15:23:40 +06: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
a0f1f6692c Use Py_ssize_t instead of long 2013-02-13 18:36:09 -08:00
Bryant Mairs
f3d601b579 Python 3-ified _imagingcms.c and display.c, at least when compiling for Py3.3x64 on Win7x64 with MSVC10. 2013-02-01 17:45:16 +01:00
d-schmidt
45a97bb430 fixed an error with utf-8 chars in color profile names 2013-01-10 20:07:28 +01:00
Brian Crowell
a8599e8bb2 py3k: Remove ancient Python hacks 2013-01-10 08:46:57 -06:00
Brian Crowell
8b704e3005 py3k: Publish both frombytes and fromstring in C modules for old Python
To ease the transition, frombytes and tobytes need to be declared in both
versions.
2013-01-10 08:46:55 -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
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
d-schmidt
a36338f195 fixed crash loading broken color profile from file-like object 2013-01-09 21:04:02 +01:00
Alex Clark
9a640e3157 Forking PIL 2010-07-30 22:52:47 -04:00