[Image-SIG] New member and question about colorspace query in PythonMagick
David Berthelot
d_berthelot at yahoo.com
Sun Feb 1 08:46:05 CET 2009
Hi,
I've been using PIL for a while, and I mostly use it as front-end to numpy, doing some image processing using all the elaborate math tools available in numpy.
However I found out that PIL sometimes doesn't produce the correct output for some JPEG files (for examples 4 channel JPEG), however these can be read by ImageMagick, so that's how I turned to PythonMagick. So here come the difficulties, I couldn't find a documentation for it. So I naturally looked at the Magick++ documentation (which is what PythonMagick is wrapping anyway).
What I want to do is overly simple: query the colorspace (RGB,RGBA,CMYK,YCbCr, or whatever it is) of an image.
>>> import PythonMagick as PM
>>> img = PM.Image("test.jpg")
>>> img.colorSpace
<bound method Image.colorSpace of <PythonMagick.Image object at 0x....>>
>>> img.colorSpace()
TypeError: No to_python (by-value) converter found for C++ type: MagickLib::ColorspaceType
At this point, I'm not sure how to check the colorspace, did I just hit a non-implemented part of the API ?
I'm using PythonMagick 0.8 (on Ubuntu 8.04).
Thanks,
David Berthelot
More information about the Image-SIG
mailing list