Using Morph with image transitions

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
zhares
Posts: 2
Joined: 2015-02-13T08:29:02-07:00
Authentication code: 6789

Using Morph with image transitions

Post by zhares »

Hello,
I'm trying to create a transition between images, everything correct, finally manage to create the GIF.
now i want to create some transition between the images using Morph, but, with a delay on each image, is this possible??

i saw this: http://www.imagemagick.org/Usage/anim_mods/#morph
how can i convert this code to Perl code?

Code: Select all

-set delay '%[fx:(t>0&&t<n-1)?10:240]'
i have a set of 5 images, i want a fade between them, but a longer delay on each image, is this possible from PerlMagick??

i'm using this, but seems that apply the 10 delay to all:

Code: Select all

# ($animation is my image that have 5 images readed)
my $p = $animation->Morph(frames=>9);
$p->Set(delay => "%[fx:(t%10!=0 || t==n-1)?10:240]");
$p->Write($tmpFolder . 'animation.gif');
Big thanks!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Using Morph with image transitions

Post by fmw42 »

If on Unix, see my bash shell scripts for fxtransitions and transitions at the link below.
zhares
Posts: 2
Joined: 2015-02-13T08:29:02-07:00
Authentication code: 6789

Re: Using Morph with image transitions

Post by zhares »

thanks for your reply @fmw42

I'm not using bash, i'm using Perl, and want to do it from the Perl library is this possible or need to use bash script?

Thanks.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Using Morph with image transitions

Post by fmw42 »

I suspect you can do some thing similar from Perlmagick. But I do not know that API. I only code bash shell scripts.
Post Reply