Gossamer Forum
Home : General : Perl Programming :

Image::Magick - animations showing corrupt :(

Quote Reply
Image::Magick - animations showing corrupt :(
Hi,

I've come across a problem with images that are animated, and "scaling" the image dimensions down.

The code is:

Code:
$image = Image::Magick->new;
$x = $image->Read($path);
if ($x) { print "Error: $x"; exit; }

print qq|Debug: geometry=>$_PercentageSmaller \n|;
$x = $image->Scale(geometry=>$_PercentageSmaller);
if ($x) { print "Error: $x"; exit; }


print qq|Debug: filename=>$WriteImage \n|;
$x = $image->Write(filename=>$WriteImage);
if ($x) { print "Error: $x"; exit; }

Attached is a sample image that is made. Anyone got any ideas? :/

TIA

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Image::Magick - animations showing corrupt :( In reply to
Hi Andy,

Actually this is a not new problem Unsure

Here is the more info from the source:
http://www.imagemagick.org/...ds/index.html#resize

p.s. You must use Coalesce() to convert the image sequence to one whose images all have the same dimensions.

Cheers,
Boris

Facebook, Twitter and Google+ Auth for GLinks and GCommunity | reCAPTCHA for GLinks | Free GLinks Plugins

Last edited by:

eupos: Apr 26, 2007, 9:08 AM
Quote Reply
Re: [eupos] Image::Magick - animations showing corrupt :( In reply to
Hi,

Ah, I was wondering if it was an ImageMagick issue :(

Doesn't sound like much fun to do then;

1) Copy image to a tmp folder
2) Write the contents of Coalesce() to tmp files
3) Resize the "filmstrip" of images
4) Put the all back together again and save.

Bit long winded for my liking, and probably pretty time consuming :(

Thanks anyway.

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Image::Magick - animations showing corrupt :( In reply to
I get around this by using Gifsicle (http://www.lcdf.org/gifsicle/) to resize and manipulate animated GIF's. Very powerful application.

----
Cheers,

Dan
Founder and CEO

LionsGate Creative
GoodPassRobot
Magelln
Quote Reply
Re: [dan] Image::Magick - animations showing corrupt :( In reply to
Hi,

Thanks for the reply.

Is there a Perl interface for this program, or would I just use `` / system() to run the command line stuff? (Perl interface will be good - but the system commands will be fine too =)

TIA

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Image::Magick - animations showing corrupt :( In reply to
Unfortunately not - not that I know of. I use within PHP environment using exec function. To state the obvious, make sure to taint check any user-passed variables.

----
Cheers,

Dan
Founder and CEO

LionsGate Creative
GoodPassRobot
Magelln