bluescan / tacentview

An image and texture viewer for tga, png, apng, exr, dds, pvr, ktx, ktx2, astc, pkm, qoi, gif, hdr, jpg, tif, ico, webp, and bmp files. Uses Dear ImGui, OpenGL, and Tacent. Useful for game devs as it displays information like the presence of an alpha channel and querying specific pixels for their colour.
ISC License
378 stars 36 forks source link

The first frame of animated gifs with transparency contains uninitialized (garbage) pixels #41

Closed Oddwarg closed 2 years ago

Oddwarg commented 2 years ago

Unsure if this is the correct project to report this bug, but the problem is that transparent pixels are allocated, but never initialised to any value for the first frame in a gif file. This can be fixed by inserting the line memset(FrmPict, 0, Width * Height * sizeof(tPixel)); at line 47 of tImageGif.cpp.

Incorrect, garbage background: garbage

Correct, clean background: fixed

bluescan commented 2 years ago

It's a fine place to report this -- plus you supplied the fix which is even better. It's fixed in the tacent library. You'll probably need to reconfigure to get cmake to fetch the latest tacent lib.