mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-12 22:14:29 +02:00
use a user-visible MACRO for max width/height.
This has been pointed as a useful information to have in the header (for the non VP8-specs savvy ones) Change-Id: I494b1da41dfafce882a94e3677d1cd6206bc504b
This commit is contained in:
committed by
James Zern
parent
d4e9f5598d
commit
7a8d8762c1
@ -26,8 +26,6 @@ extern "C" {
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#define MAX_DIMENSION 16384 // maximum width/height allowed by the spec
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
int WebPGetEncoderVersion(void) {
|
||||
@ -329,7 +327,7 @@ int WebPEncode(const WebPConfig* const config, WebPPicture* const pic) {
|
||||
return WebPEncodingSetError(pic, VP8_ENC_ERROR_BAD_DIMENSION);
|
||||
if (pic->y == NULL || pic->u == NULL || pic->v == NULL)
|
||||
return WebPEncodingSetError(pic, VP8_ENC_ERROR_NULL_PARAMETER);
|
||||
if (pic->width >= MAX_DIMENSION || pic->height >= MAX_DIMENSION)
|
||||
if (pic->width > WEBP_MAX_DIMENSION || pic->height > WEBP_MAX_DIMENSION)
|
||||
return WebPEncodingSetError(pic, VP8_ENC_ERROR_BAD_DIMENSION);
|
||||
|
||||
enc = InitEncoder(config, pic);
|
||||
|
Reference in New Issue
Block a user