PDA

View Full Version : image converting stuff...


Benny
05-11-2002, 09:50 PM
Hi,

I am creating a cgi application in python and at one point in the application it creates a data file in a directory. A third party program then watches that directory for the creation of that file and once the file is there the third party application uses the data in that file to output an image file. This image file is then displayed to the user.

The problem I have is that the third-party app can only output the image as a pdf, a postscript file (ps) or a ppml file. Is there a way in python I can convert any of these formats to a standard image type, such as jpg?

I tried using the Python Imaging Library to convert from pdf to jpg, but PIL can only save pdf files and not open them, hence I can't do the conversion..

Any ideas?

Strike
05-14-2002, 12:32 PM
Have you tried using .ps files with PIL? You could always use ImageMagick's stuff ... I think they might even have Python bindings.

inkedmn
05-14-2002, 05:38 PM
i think imagemagick supports just about every language EXCEPT python...

it appears as though you could do it in C (if that's an option)...

http://www.imagemagick.org

Benny
05-16-2002, 09:02 AM
Thanks guys,

I think I should be able to work something out.


Cheers.
Ben