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


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
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.

rgrdz
Boris

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


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
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
Principal

Virtual Solutions
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


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
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
Principal

Virtual Solutions