[magick-users] FW: How to set attribute in PerlMagick about -density option in ImageMagick ?
신하얀
white at gaia3d.com
Sun Nov 16 06:08:52 PST 2008
Hi, there
I received the solution from Pete.
Here is solution
====================================
Hi,
Try this:
Use Image::Magick;
my $image = Image::Magick->new();
$image->Set(units=>1);
$image->Set(density=>110); <== set attribute before read file
$image->Read($ps_file);
$image->Rotate(degrees=>-90);
$image->Trim();
$image->Write($gif_file);
Best Wishes
Pete
==================================
-----Original Message-----
From: magick-users-bounces at imagemagick.org [mailto:magick-users-bounces at imagemagick.org] On Behalf Of zentara
Sent: Saturday, November 15, 2008 11:00 PM
To: magick-users at imagemagick.org
Subject: Re: [magick-users] How to set attribute in PerlMagick about -density option in ImageMagick ?
On Sat, 15 Nov 2008 19:27:57 +0900
______ <white at gaia3d.com> wrote:
>Hello, I have some problem using Perl interface.
>
>* my environment:
>
> Perl 5.8.8, ImageMagick 6.1.8, PerlMagick6.4 (I couldn¡¯t find PerlMagick
>6.1.8 package on the web)
>
>I want to convert postscript Image file to gif file.
>Here, when I use ¡®convert¡¯ of Imagemagick, it works good.
>
>convert -crop 0x0 -rotate -90 -density 110 $ps_file $gif_file
>
>I want to do same job using perl script as below but, image size dosen¡¯t
>same.
>
>Ps2gif.pl
>
>------------------------------------
>
>Use Image::Magick;
>
>my $image = Image::Magick->new();
>
>$image->Read($ps_file);
>
>$image->Rotate(degrees=>-90);
>
>$image->Trim();
>
>$image->Set(units=>1); <-- This code didn¡¯ work !!!
>
>$image->Set(density=>110); <---This code didn¡¯t work!!!!
>
>$image->Write($gif_file);
>
>Please, let me know solve this problem.
Your perl script seems to work for me with ImageMagick-6.4.3,
and the PerlMagick that comes with it. Maybe if you could
post a small ps file you are working with, and what you see as
output.
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
Magick-users at imagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick-users
More information about the Magick-users
mailing list