[Image-SIG] Fix for use of tkImaging as a dynloadable command
Tue, 12 Jan 1999 08:35:59 +0100
David Ascher <firstname.lastname@example.org> wrote:
>Starting with PIL 1.0b1, I've managed to patch tkImaging so that it can be
>loaded dynamically from an unmodified tk or _tkinter. It's surprisingly
>not too bad, once one has done it for Togl =).
>The patches are very minor, but require changing the name of the init
>function to Tkimaging_Init (that's a requirement of the dynloading of Tk
>-- it has to be Upper_Init).
Interesting. I have similar patches that does it the other way -- it
calls a function in _imaging.dll with a pointer to the Tcl interpreter.
In other words, I let Python do the dynamic loading...
>I propose that these patches be added to PIL for future releases. Having
>dynamically loaded extensions is a GoodThing(tm).
One of these solutions will definitely be added before 1.0 final.
>PPS: Fredrik -- FYI, I still have that problem with the Adobe CMYK file --
>is that just a difference of opinion among 'standards'?
Didn't get around to fix that before the 1.0b1 release (the code
was "frozen" before I got your sample. In the meantime, you can
try removing the following two lines from JpegImagePlugin.py:
if self.mode == "CMYK" and self.info.has_key("adobe"):
rawmode = "CMYK;I" # Photoshop 2.5 is broken!