Now you've got me going... I really didn't care that much about animated
GIFs, I was just trying to help...  But I was getting annoyed that I
couldn't figure out how to get the individual frames, or even a frame count.

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
[EMAIL PROTECTED]

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Glenn Linderman
Sent: Monday, September 25, 2006 10:57 PM
To: Brian Millham
Cc: perl-win32-gui-users@lists.sourceforge.net
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.

-- 
Glenn -- http://nevcal.com/
===========================
A protocol is complete when there is nothing left to remove.
-- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/
---
avast! Antivirus: Inbound message clean.
Virus Database (VPS): 0639-1, 09/25/2006
Tested on: 9/25/2006 11:28:33 PM
avast! is copyright (c) 2000-2006 ALWIL Software.
http://www.avast.com



---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0639-1, 09/25/2006
Tested on: 9/25/2006 11:45:09 PM
avast! is copyright (c) 2000-2006 ALWIL Software.
http://www.avast.com





Reply via email to