Add wuffs_gif__quirk_initial_background_is_opaque

This commit is contained in:
Nigel Tao committed 2019-05-04 12:35:37 +10:00
1 parent 941cecca8c
commit 1311445408
3 files changed
+59 -11

No files matched your search

+8 -5
View File
@@ -209,11 +209,14 @@ pub func decoder.decode_image_config?(dst nptr base.image_config, src base.io_re
// TODO: if this.end_of_data, return an error and/or set dst to zero?
ffio = (not this.gc_has_transparent_index) and
(this.frame_rect_x0 == 0) and
(this.frame_rect_y0 == 0) and
(this.frame_rect_x1 == this.width) and
(this.frame_rect_y1 == this.height)
ffio = not this.gc_has_transparent_index
if not this.quirk_enabled_initial_background_is_opaque {
ffio = ffio and
(this.frame_rect_x0 == 0) and
(this.frame_rect_y0 == 0) and
(this.frame_rect_x1 == this.width) and
(this.frame_rect_y1 == this.height)
}
if args.dst <> nullptr {
// TODO: a Wuffs (not just C) name for the