mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
Merge changes Ifcae0f38,Iee2d7401
* changes: wicdec: fail with animated images [cd]webp: document lack of animated webp support
This commit is contained in:
commit
d7bf01c954
5
README
5
README
@ -225,6 +225,7 @@ Usage:
|
|||||||
|
|
||||||
If input size (-s) for an image is not specified, it is
|
If input size (-s) for an image is not specified, it is
|
||||||
assumed to be a PNG, JPEG, TIFF or WebP file.
|
assumed to be a PNG, JPEG, TIFF or WebP file.
|
||||||
|
Note: Animated PNG and WebP files are not supported.
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-h / -help ............. short help
|
-h / -help ............. short help
|
||||||
@ -344,7 +345,9 @@ The full list of options is available using -h:
|
|||||||
> dwebp -h
|
> dwebp -h
|
||||||
Usage: dwebp in_file [options] [-o out_file]
|
Usage: dwebp in_file [options] [-o out_file]
|
||||||
|
|
||||||
Decodes the WebP image file to PNG format [Default]
|
Decodes the WebP image file to PNG format [Default].
|
||||||
|
Note: Animated WebP files are not supported.
|
||||||
|
|
||||||
Use following options to convert into alternate image formats:
|
Use following options to convert into alternate image formats:
|
||||||
-pam ......... save the raw RGBA samples as a color PAM
|
-pam ......... save the raw RGBA samples as a color PAM
|
||||||
-ppm ......... save the raw RGB samples as a color PPM
|
-ppm ......... save the raw RGB samples as a color PPM
|
||||||
|
@ -527,6 +527,7 @@ static void HelpLong(void) {
|
|||||||
printf(" cwebp [-preset <...>] [options] in_file [-o out_file]\n\n");
|
printf(" cwebp [-preset <...>] [options] in_file [-o out_file]\n\n");
|
||||||
printf("If input size (-s) for an image is not specified, it is\n"
|
printf("If input size (-s) for an image is not specified, it is\n"
|
||||||
"assumed to be a PNG, JPEG, TIFF or WebP file.\n");
|
"assumed to be a PNG, JPEG, TIFF or WebP file.\n");
|
||||||
|
printf("Note: Animated PNG and WebP files are not supported.\n");
|
||||||
#ifdef HAVE_WINCODEC_H
|
#ifdef HAVE_WINCODEC_H
|
||||||
printf("Windows builds can take as input any of the files handled by WIC.\n");
|
printf("Windows builds can take as input any of the files handled by WIC.\n");
|
||||||
#endif
|
#endif
|
||||||
|
@ -76,7 +76,8 @@ static int SaveOutput(const WebPDecBuffer* const buffer,
|
|||||||
|
|
||||||
static void Help(void) {
|
static void Help(void) {
|
||||||
printf("Usage: dwebp in_file [options] [-o out_file]\n\n"
|
printf("Usage: dwebp in_file [options] [-o out_file]\n\n"
|
||||||
"Decodes the WebP image file to PNG format [Default]\n"
|
"Decodes the WebP image file to PNG format [Default].\n"
|
||||||
|
"Note: Animated WebP files are not supported.\n\n"
|
||||||
"Use following options to convert into alternate image formats:\n"
|
"Use following options to convert into alternate image formats:\n"
|
||||||
" -pam ......... save the raw RGBA samples as a color PAM\n"
|
" -pam ......... save the raw RGBA samples as a color PAM\n"
|
||||||
" -ppm ......... save the raw RGB samples as a color PPM\n"
|
" -ppm ......... save the raw RGB samples as a color PPM\n"
|
||||||
|
@ -298,9 +298,15 @@ int ReadPictureWithWIC(const char* const filename,
|
|||||||
factory, stream, NULL,
|
factory, stream, NULL,
|
||||||
WICDecodeMetadataCacheOnDemand, &decoder));
|
WICDecodeMetadataCacheOnDemand, &decoder));
|
||||||
IFS(IWICBitmapDecoder_GetFrameCount(decoder, &frame_count));
|
IFS(IWICBitmapDecoder_GetFrameCount(decoder, &frame_count));
|
||||||
if (SUCCEEDED(hr) && frame_count == 0) {
|
if (SUCCEEDED(hr)) {
|
||||||
fprintf(stderr, "No frame found in input file.\n");
|
if (frame_count == 0) {
|
||||||
hr = E_FAIL;
|
fprintf(stderr, "No frame found in input file.\n");
|
||||||
|
hr = E_FAIL;
|
||||||
|
} else if (frame_count > 1) {
|
||||||
|
// WIC will be tried before native WebP decoding so avoid duplicating the
|
||||||
|
// error message.
|
||||||
|
hr = E_FAIL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
IFS(IWICBitmapDecoder_GetFrame(decoder, 0, &frame));
|
IFS(IWICBitmapDecoder_GetFrame(decoder, 0, &frame));
|
||||||
IFS(IWICBitmapFrameDecode_GetPixelFormat(frame, &src_pixel_format));
|
IFS(IWICBitmapFrameDecode_GetPixelFormat(frame, &src_pixel_format));
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
.\" Hey, EMACS: -*- nroff -*-
|
.\" Hey, EMACS: -*- nroff -*-
|
||||||
.TH CWEBP 1 "January 11, 2019"
|
.TH CWEBP 1 "November 19, 2020"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
cwebp \- compress an image file to a WebP file
|
cwebp \- compress an image file to a WebP file
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@ -13,6 +13,7 @@ command.
|
|||||||
.PP
|
.PP
|
||||||
\fBcwebp\fP compresses an image using the WebP format.
|
\fBcwebp\fP compresses an image using the WebP format.
|
||||||
Input format can be either PNG, JPEG, TIFF, WebP or raw Y'CbCr samples.
|
Input format can be either PNG, JPEG, TIFF, WebP or raw Y'CbCr samples.
|
||||||
|
Note: Animated PNG and WebP files are not supported.
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
The basic options are:
|
The basic options are:
|
||||||
.TP
|
.TP
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
.\" Hey, EMACS: -*- nroff -*-
|
.\" Hey, EMACS: -*- nroff -*-
|
||||||
.TH DWEBP 1 "June 23, 2016"
|
.TH DWEBP 1 "November 19, 2020"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
dwebp \- decompress a WebP file to an image file
|
dwebp \- decompress a WebP file to an image file
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@ -12,6 +12,7 @@ This manual page documents the
|
|||||||
command.
|
command.
|
||||||
.PP
|
.PP
|
||||||
\fBdwebp\fP decompresses WebP files into PNG, PAM, PPM or PGM images.
|
\fBdwebp\fP decompresses WebP files into PNG, PAM, PPM or PGM images.
|
||||||
|
Note: Animated WebP files are not supported.
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
The basic options are:
|
The basic options are:
|
||||||
.TP
|
.TP
|
||||||
|
Loading…
Reference in New Issue
Block a user