Genesi Home Home Projects Forums
Login
Username:

Password:

Remember Me
 
[Register an Account]

Developer Programs
i.MX515
Power2People MPC8610

Efika 5200B

Search Projects

Google

Sponsored By



Efika 5200B Project
Reggae on Efika

in category Multimedia
proposed by Grzegorz Kraszewski on 21st February 2006 (accepted on 20th March 2006)

Blog Entry

  More GIF quirks
posted by Grzegorz Kraszewski on 23rd July 2007

I've decided to download some more GIF anims to test my decoder. Then I've found 2 problems, one of them was bug in my code, the other one is a result of breaking specifications by GIF generators.

The first one was the way gif.decoder skipped over unknown extension blocks. It just ignored the block intrudocer blindly searching for a comma (image tile introducer). It failed horribly with a GIF containing comment extension and a comma inside... Now unknown extensions are skipped properly using data blocks lenghts and detecting terminating zero size data block.

The second problem is more serious. I've found a GIF, where a frame is bigger than a logical screen. It is an obvious violation of the GIF specification. The decoder stops and returns with error currently, maybe some clipping will be better approach.

There is also a "zero delay" problem. I've assumed that zero delay means following tile is just a tile and does not create an animation frame. It seems however that some old GIF editors used 0 as "render as fast as possible" value. I've found one file with zero delays, BTW it is the same file which has out-of-bounds frame, as described above. I'm not sure if I should generate frame at zero delay, as zero delay is useful for creating tiled images with transparency.

After all, the decoder is progressing well, transparency support is finished, background regenerator almost done. Then I need anim synchronizer and direct support of the metaformat at output.

PowerDeveloper.org: Copyright © 2004-2010, Genesi USA, Inc. The Power Architecture and Power.org wordmarks and the Power and Power.org logos and related marks are trademarks and service marks licensed by Power.org. All other names and trademarks used are property of their respective owners. Privacy Policy