Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
Andrew  
#1 Posted : Wednesday, November 26, 2003 11:43:00 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 863

Thanks: 2 times
Was thanked: 25 time(s) in 25 post(s)
Graphics Mill can work not only with static bitmaps, but with animated images too. Currently it supports animated GIF only, but in the nearest future we plan to add multipage TIFF support and migrate AVI Processor to the Graphics Mill architecture. Those who worked with AVI Processor will find animated GIFs in Graphics Mill familiar. To read animated GIF files, you should use GifReader class, to save it - GifWriter. Each GIF frame is presented with GifFrame class. GifReader contains a collection of GifFrames. So to read GIF frames, you should just iterate through the collection either with For Each statement:
Code:
Dim objReader As New GifReader
objReader.OpenFile "c:\animagif.gif"

Dim objFrame As GifFrame
For Each objFrame In objReader.Frames
    objFrame.Bitmap.SaveToFile "c:\frame_" & objFrame.Index & ".gif"
Next
objReader.Close
or just get necessary frame by index:
Code:
If I < objReader.Frames.Count Then
  objReader.Frames(I).Bitmap.SaveToFile "c:\frame.gif"
End If
Writing animated GIF is a piece of cake too. You should create a frame or get it from GifReader and pass it to the AddFrame method:
Code:
Dim objReader As New GifReader
Dim objWriter As New GifWriter
Dim objFrame As GifFrame

objReader.OpenFile "c:\animagif.gif"
objWriter.OpenFile "c:\result.gif"
For Each objFrame In objReader.Frames
    objWriter.AddFrame objFrame
Next
objReader.Close
objWriter.Close
These code samples are pretty basic and they intended only to give an idea about capabilites of the Graphics Mill in processing of animated GIF files. More detailed code sample you can find in attachments. If you have any problems with it, please feel free to let us know.

Edited by user Monday, December 24, 2007 6:20:09 PM(UTC)  | Reason: Not specified

File Attachment(s):
GraphicsMillAnimatedGifSample.zip (4kb) downloaded 95 time(s).
bodygard  
#2 Posted : Wednesday, January 12, 2005 10:30:00 AM(UTC)
bodygard

Rank: Member

Groups: Member
Joined: 1/12/2005(UTC)
Posts: 4

Please help me! i want to play an animated gifs in a bitmapviewer, it's possible? i have a bitmapviewer and i want to insert animated gifs, what it the solution? thanks for your help!
Fedor  
#3 Posted : Wednesday, January 12, 2005 11:22:00 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,508

Thanks: 3 times
Was thanked: 49 time(s) in 48 post(s)
Yes, it is possible, but it isn't out of the box. We will work over sample and will post it here.
Best regards, Fedor Skvortsov
bodygard  
#4 Posted : Thursday, January 13, 2005 12:48:00 AM(UTC)
bodygard

Rank: Member

Groups: Member
Joined: 1/12/2005(UTC)
Posts: 4

thank you. yes not out of the box, in the bitmapviewer
bodygard  
#5 Posted : Saturday, January 15, 2005 5:01:00 AM(UTC)
bodygard

Rank: Member

Groups: Member
Joined: 1/12/2005(UTC)
Posts: 4

I'm waiting for the solution !!! I can't read the animated gif please help me !!!
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.