From c9dd9bd40b77e53fabc05a009804d64dc32e1584 Mon Sep 17 00:00:00 2001 From: James Zern Date: Tue, 16 Jul 2024 15:38:13 -0700 Subject: [PATCH] webp-container-spec: align anim pseudocode w/prose - add missing 'or application-defined color' when creating the canvas - reference 'dispose_method' before rendering image Bug: webp:646 Change-Id: I25734d1912644f0aa6c87e14b80ed8cd9b180056 --- doc/webp-container-spec.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/webp-container-spec.txt b/doc/webp-container-spec.txt index c64bfd409..08ea841c2 100644 --- a/doc/webp-container-spec.txt +++ b/doc/webp-container-spec.txt @@ -781,7 +781,8 @@ _VP8X.field_ means the field in the 'VP8X' Chunk with the same description. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ VP8X.flags.hasAnimation MUST be TRUE canvas ← new image of size VP8X.canvasWidth x VP8X.canvasHeight with - background color ANIM.background_color. + background color ANIM.background_color or + application-defined color. loop_count ← ANIM.loopCount dispose_method ← Dispose to background color if loop_count == 0: @@ -809,6 +810,7 @@ for loop = 0..loop_count - 1 bitstream subchunks not found in 'Frame Data' earlier MUST be TRUE frame_params.bitstream = bitstream_data + apply dispose_method. render frame with frame_params.alpha and frame_params.bitstream on canvas with top-left corner at (frame_params.frameX, frame_params.frameY), using Blending method