Rank: Member
Groups: Member
Joined: 11/11/2004(UTC) Posts: 1
|
I am from Korea. I am developing in ASP, and I want to get an Image from animated GIF Frames. I used GIFReader Object. The following code can extract images from the animated GIF "a.gif" Code:<%
Dim objBitmap
Set objBitmap = Server.CreateObject("MultiImage.GifReader")
objBitmap.OpenFile "a.gif"
objBitmap.IsLzwEnabled = true
Dim i
i = 0
for i=0 to objBitmap.Frames.count -1
objBitmap.Frames.Item(i).Bitmap.SaveToFile "a" & i & ".gif"
next
Set objBitmap = Nothing
%>
But, the extracted Images are not clear. some noises are appeared in the extracted images. I don't Know the reason??? the sample image "a.gif" is attached.. Please, Answer me.. Thanks... Edited by user Tuesday, December 18, 2007 7:51:28 PM(UTC)
| Reason: Not specified eksis attached the following image(s):
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
This GIF seems to be optimized when saved. It means that the software which created this movie compared two nearest frames and "subtracted" those parts of frame which are the same on both frames (it allows to reduce size). When the GIF viewer opens this file, it draws such frame directly on the previous one, without erasing it. As a result it looks correctly.
So if you do not want to have actual frame data, but just need to have frames as they are displayed in the GIF viewer, you need to blend each frame with the previous one.
In fact, it is a bit more difficult - you should take into account a property called DisposalMethod" (value specifying how the previous frame should be handled - erased, or just left as is - the next frame should be drawn on it as described above). Also, frame may have positioned on the previous frame - use the Left and Top properties.
Hope this helps.
|
|
|
|
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.