From: Steve L. <ste...@sc...> - 2006-09-26 20:26:33
|
Frame timing: $delay = $image->[$frame_count]->Get('delay'); (I think!). Still having some issue with anims (I think its PerlMagick thats causing the problems), but its most certainly getting there :) Steve > So now I'm working on this. I can now get individual frames from an > animated gif. > > $image = Image::Magick->new(); > $image->Read('ani.gif'); > $framecount = $#$image; > $frame0 = $image->[0]; > $frame1 = $image->[1]; > > Note the difference from your example. Not $image[0] but $image->[0]. > > Now I need to display the images in a Win32::GUI window, and figure out the > timing. > > Brian Millham > This message traveled at least 44,000 miles to reach you! > Creator of the DW6000 Monitor > http://www.millham.net/dw6000 > bmi...@hu... > > -----Original Message----- > From: per...@li... > [mailto:per...@li...] On Behalf Of > Glenn Linderman > Sent: Monday, September 25, 2006 10:57 PM > To: Brian Millham > Cc: per...@li... > Subject: Re: [perl-win32-gui-users] [win32-gui] DIBitmap and Animated GIFs? > > On approximately 9/25/2006 7:21 PM, came the following characters from > the keyboard of Brian Millham: >> As I revisited this, I remembered that my problem with ImageMagick was > with >> threads, not Win32::GUI (ImageMagick doesn't seem to work at all with >> threads). >> >> I've been playing with this, and ImageMagick can read animated gif's. I >> haven't figured out how to get individual frames from the animation. All > I >> can get is the first frame... > > Try using subscripts. Maybe something like this would work... You can > also get help on the imagemagick mailing list. > > $image = Image::Magick->new(); > $image->Read('ani.gif'); > $framecount = $#$image; > $frame0 = $image[ 0 ]; > $frame1 = $image[ 1 ]; > > etc. > > You get to add the bounds checking and error checking. Animated GIF > files, IIRC, are not always full-frame, but deltas? That's all I think > I know about them, but I could be wrong. So I'm not sure if you display > the frames individually that they will be what you expect, but if you > are into animated GIFs, maybe they will be what you expect. > |