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

Notification

Icon
Error

Options
Go to last post Go to first unread
Defconfyv  
#1 Posted : Tuesday, October 17, 2006 10:17:43 PM(UTC)
Defconfyv

Rank: Member

Groups: Member
Joined: 10/17/2006(UTC)
Posts: 1

I have started to use aurigma graphics mill as a conversion utility for our application. I am converting animated gif's into SWF's. I seem to have found through our graphics dept, two different types of animated gifs. The first is a frame by frame animation, each frame is its own image. The second seems to be a smarter animated gif, one that only shows the change from the previous frame. I believe image ready does this type of animated gif. Anyhow, I have successfully outputted a swf for each of these two types of animated gifs, but as far as I can tell I do not know when to use what logic. Is there a flag for this or a better procedure that handles them?

Heres what I am doing if the animation is using image ready style gifs:
Code:
if (bmpCummulative == null)
    bmpCummulative = Slice.Clone() as Aurigma.GraphicsMill.Bitmap;
else
{
    new Combiner(Slice, new RectangleF(gfIn.Left, gfIn.Top, Slice.Width, Slice.Height), new RectangleF(0, 0, Slice.Width, Slice.Height), CombineMode.Alpha, 1, InterpolationMode.HighQuality).ApplyTransform(bmpCummulative);
    Slice = bmpCummulative.Clone() as Aurigma.GraphicsMill.Bitmap;
}


if I remove this code when doing a frame to frame style animation created by other animated gif's typically found on the internet then it works for those; however, both concepts are quite different. If I leave out the cummaltive check and cummulate the frames then animated gifs with the smart/compressed style doesnt output to swf correctly. And if I include this cummulation then simple animated gifs that have a different image for each frame output incorrectly. I dont seem to tell any difference in properties between the two that helps me understand when to do one vs the other. Any help would be great. Thanks

Edited by user Wednesday, December 19, 2007 3:41:19 AM(UTC)  | Reason: Not specified

Dmitry  
#2 Posted : Wednesday, October 18, 2006 6:28:15 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello,

You try to implement your own GIF animator :)

The situation is more difficult than you have described. Each frame of GIF file has property named "disposal method" - this property specifies what to do after the frame is rendered. There are 4 different disposal methods: not specified, none, restore to background and restore to previous. So before rendering of frame you should choose algorithm of combining current frame with the last output from your renderer. To make this decision you should use information about disposal method from the previous frame. To get disposal method you should use GifFrame.DisposalMethod property.

Specification of GIF format is here - http://www.w3.org/Graphics/GIF/spec-gif89a.txt

Edited by user Tuesday, January 01, 2008 4:53:54 AM(UTC)  | Reason: Not specified

Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
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.