mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-19 20:08:28 +01:00
tiffdec: add grayscale support
the file is always decoded to RGBA, so just the samples_per_px needed an update Bug: webp:563 Change-Id: I95d95c3b9e45dc8ecb2223f89f4ba791f0b21e8b
This commit is contained in:
parent
e685feef0c
commit
0957fd69ee
@ -188,7 +188,9 @@ int ReadTIFF(const uint8_t* const data, size_t data_size,
|
|||||||
fprintf(stderr, "Error! Cannot retrieve TIFF samples-per-pixel info.\n");
|
fprintf(stderr, "Error! Cannot retrieve TIFF samples-per-pixel info.\n");
|
||||||
goto End;
|
goto End;
|
||||||
}
|
}
|
||||||
if (samples_per_px < 3 || samples_per_px > 4) goto End; // not supported
|
if (!(samples_per_px == 1 || samples_per_px == 3 || samples_per_px == 4)) {
|
||||||
|
goto End; // not supported
|
||||||
|
}
|
||||||
|
|
||||||
if (!(TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &image_width) &&
|
if (!(TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &image_width) &&
|
||||||
TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &image_height))) {
|
TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &image_height))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user