On Wed, 24 Dec 2008 09:39:59 -0600 Carl Karsten <[email protected]> wrote:
>I am trying to do in process conversions. I generate pdf, I need that >converted >to a png (no disk files, no stdio.) > >I am not familiar with the AIP. I need a clue on how I can pass in the data >instead of a file name, and how to retrieve a converted image. > >I am trying to use PythonMagickWand [1] so if you can answer in the form of >python code, one less thing for me to do. > >[1]http://public.procoders.net/PythonMagickWand/docs/html/index.html >http://www.procoders.net/?p=121 > >Carl K I'm assuming that you get the pdf from the stdout of some other program. This isn't Python, but it works in Perl and may show you a clue for Python. #!/usr/bin/perl use warnings; use strict; use Image::Magick; # simulate a pdf in memory, like from another program my $rawpdf = `cat zzimage.pdf`; my $output = Image::Magick->new(); $output->BlobToImage( $rawpdf ); $output->Write('zout.png'); #or if you want to write to stdout #binmode STDOUT; #$output->Write('png:-'); __END__ zentara -- I'm not really a human, but I play one on earth. http://zentara.net/Remember_How_Lucky_You_Are.html _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
