Pages

Sunday, February 7, 2010

APNG from GIF by maxst

APNG from GIF
APNG can be smaller than GIF. This program will make your GIF animations smaller by converting them into Animated PNG format. Simple gif2apng.c source code compiles under Windows and Linux. Command line: gif2apng.exe anim.gif [anim.png]

Changelog:
gif2apng 1.1
--------------------------------
- Improved handling of transp. color


usage: drag'n drop the gif file over gif2apng.exe

Samples:



GIF:
44,5 KB (45.648 bytes)

APNG:
37,4 KB (38.390 bytes)


GIF:
47.87 KB (49017 Bytes)

APNG:
48.48 KB (49646 Bytes)


Optimized (Thanks for the Hint from Tuxman by the Ghost Image)

GIF:

37.62 KB (38524 Bytes)

APNG:

36.75 KB (37631 Bytes)

===========================================

Homepage: http://gif2apng.sourceforge.net/
Download

Download Page: http://sourceforge.net/projects/gif2apng/files/

Browser Test: http://people.mozilla.com/~dolske/apng/demo.html


apng:

gif:

5 comments:

maxst said...

Unfortunately, Firefox rendering of APNG is kinda buggy, as you can see on the last (optimized) example.

Opera renders them fine, so it's a Firefox problem.

I believe it's a bug #433047

Admin said...

In fact, by Opera it shows the APNG images correctly.

maxst said...

They are displayed much better in Firefox 3.5.7
Empty frame "flicker" only shows in Firefox 3.6

Admin said...

Now it will be great to see it working with this fix from you:
https://bugzilla.mozilla.org/show_bug.cgi?id=546272

https://bug546272.bugzilla.mozilla.org/attachment.cgi?id=427310


I can not compile anything at the moment. I erased by traveling VS from hard disk. Can you or anyone (Tux, morph4u,... someone with VS installed - eMule coders) compile Firefox for windows with this bugfix 3.6, 3.7?

Admin said...

Now it will be great to see it working with this fix from you:
https://bugzilla.mozilla.org/show_bug.cgi?id=546272

diff -u8p -r -N -x '.mozconfig*' -x configure src-1.9/modules/libpr0n/decoders/png/nsPNGDecoder.cpp src/modules/libpr0n/decoders/png/nsPNGDecoder.cpp
--- src-1.9/modules/libpr0n/decoders/png/nsPNGDecoder.cpp 2010-02-17 14:13:21.185725000 +0300
+++ src/modules/libpr0n/decoders/png/nsPNGDecoder.cpp 2010-02-17 14:01:16.746229000 +0300
@@ -213,17 +213,18 @@ void nsPNGDecoder::EndImageFrame()
mImage->GetNumFrames(&numFrames);

// We can't use mPNG->num_frames_read as it may be one ahead.
if (numFrames > 1) {
// Tell the image renderer that the frame is complete
if (mFrameHasNoAlpha)
mImage->SetFrameHasNoAlpha(numFrames - 1);

- if (NS_FAILED(mImage->FrameUpdated(numFrames - 1, mFrameRect))) {
+ nsIntRect r(0, 0, mFrameRect.width, mFrameRect.height);
+ if (NS_FAILED(mImage->FrameUpdated(numFrames - 1, r))) {
mError = PR_TRUE;
// allow the call out to the observers.
}
PRUint32 curFrame;
mImage->GetCurrentFrameIndex(&curFrame);
if (mObserver)
mObserver->OnDataAvailable(nsnull, curFrame == numFrames - 1,
&mFrameRect);
https://bug546272.bugzilla.mozilla.org/attachment.cgi?id=427310


I can not compile anything at the moment. I erased by traveling VS from harddisk. Can you or anyone (Tux, morph4u,... someone with VS installed - emule coders) compile firefox for windows with this bugfix 3.6, 3.7?

Post a Comment