add a decoding option to flip image vertically

New API options: WebPDecoderOptions.flip and 'dwebp -flip ...'

it uses negative stride trick.

Also changed the decoder code to support user-supplied
buffers with negative stride, independently of the
WebPDecoderOptions.flip value.

Change-Id: I4dc0d06f0c87e51a3f3428be4fee2d6b5ad76053
This commit is contained in:
skal
2014-01-16 15:48:43 +01:00
parent 00c3c4e114
commit 5da185522b
8 changed files with 99 additions and 37 deletions

View File

@ -1,5 +1,5 @@
.\" Hey, EMACS: -*- nroff -*-
.TH DWEBP 1 "December 12, 2013"
.TH DWEBP 1 "January 11, 2014"
.SH NAME
dwebp \- decompress a WebP file to an image file
.SH SYNOPSIS
@ -76,6 +76,9 @@ The top-left corner will be snapped to even coordinates if needed.
This option is meant to reduce the memory needed for cropping large images.
Note: the cropping is applied \fIbefore\fP any scaling.
.TP
.B \-flip
Flip decoded image vertically (can be useful for OpenGL textures for instance).
.TP
.BI \-scale " width height
Rescale the decoded picture to dimension \fBwidth\fP x \fBheight\fP. This
option is mostly intended to reducing the memory needed to decode large images,