mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 06:24:27 +02:00
Add limited PAM decoding support
Should support RGB / RGB_ALPHA / GRAYSCALE correctly, though Change-Id: Idb1470581ebdfc6efee73009b2abd53889e901cb
This commit is contained in:
@ -31,8 +31,8 @@ WebPInputFileFormat WebPGuessImageType(const uint8_t* const data,
|
||||
format = WEBP_WEBP_FORMAT;
|
||||
} else if (((magic1 >> 24) & 0xff) == 'P') {
|
||||
const int type = (magic1 >> 16) & 0xff;
|
||||
// we only support 'P5' and 'P6' for now.
|
||||
if (type >= '5' && type <= '6') format = WEBP_PNM_FORMAT;
|
||||
// we only support 'P5 -> P7' for now.
|
||||
if (type >= '5' && type <= '7') format = WEBP_PNM_FORMAT;
|
||||
}
|
||||
}
|
||||
return format;
|
||||
|
Reference in New Issue
Block a user