mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-20 15:59:48 +02:00
Add a function to validate a WebPDecoderConfig
This echoes WebPValidateConfig for encoding. Change-Id: Ib404d55c7af4d0755644879ec491e3998e6b5e8d
This commit is contained in:
@ -26,10 +26,9 @@ static const uint8_t kModeBpp[MODE_LAST] = {
|
||||
4, 4, 4, 2, // pre-multiplied modes
|
||||
1, 1 };
|
||||
|
||||
// Check that webp_csp_mode is within the bounds of WEBP_CSP_MODE.
|
||||
// Convert to an integer to handle both the unsigned/signed enum cases
|
||||
// without the need for casting to remove type limit warnings.
|
||||
static int IsValidColorspace(int webp_csp_mode) {
|
||||
int IsValidColorspace(int webp_csp_mode) {
|
||||
return (webp_csp_mode >= MODE_RGB && webp_csp_mode < MODE_LAST);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user