2017-11-16 01:43:21 (UTC-02:00)
Marcel Rodrigues <marcelgmr@gmail.com>
Implemented transparency.
diff --git a/gifdec.c b/gifdec.c index 7945c35..b03e71a 100644 --- a/gifdec.c +++ b/gifdec.c @@ -311,7 +311,8 @@ read_image_data(gd_GIF *gif, uint16_t x, uint16_t y, uint16_t w) str_len = entry.length; while (1) { p = frm_off + entry.length - 1; - gif->frame[(y + p / w) * gif->width + x + p % w] = entry.suffix; + if (!gif->gce.transparency || entry.suffix != gif->gce.tindex) + gif->frame[(y + p / w) * gif->width + x + p % w] = entry.suffix; if (entry.prefix == 0xFFF) break; else