vwebp: Add background color display option

Option -usebgcolor may be used to display ANIM background color (or white if no ANIM chunk), blended on top of checkerboard. By default this is disabled (old behavior) to easily see transparent areas. Spec says that "background color MAY be used", so it's an option.
Key b may be pressed to toggle ANIM background color display. There are visual artifacts (leftovers) when toggling during an animation. This is already the case for rescaling, toggling info etc. (fixing it implies storing viewport render or rendering whole animation from start till current frame).

BUG=webp:394

Change-Id: If9ab898b2eac77226f30f062d522f9861789ef8f
This commit is contained in:
Yannis Guyon
2018-07-20 12:54:30 +02:00
parent 78ad57a36a
commit 4649b3c422
3 changed files with 66 additions and 31 deletions

View File

@ -1,5 +1,5 @@
.\" Hey, EMACS: -*- nroff -*-
.TH VWEBP 1 "November 25, 2016"
.TH VWEBP 1 "July 20, 2018"
.SH NAME
vwebp \- decompress a WebP file and display it in a window
.SH SYNOPSIS
@ -38,6 +38,10 @@ It helps by smoothing gradients and avoiding banding artifacts. Default: 50.
By default, quantized transparency planes are dithered during decompression,
to smooth the gradients. This flag will prevent this dithering.
.TP
.B \-usebgcolor
Fill transparent areas with the bitstream's own background color instead of
checkerboard only. Default is white for non-animated images.
.TP
.B \-mt
Use multi-threading for decoding, if possible.
.TP
@ -56,6 +60,9 @@ the data will be read from \fIstdin\fP instead of a file.
.B 'c'
Toggle use of color profile.
.TP
.B 'b'
Toggle display of background color.
.TP
.B 'i'
Overlay file information.
.TP