mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-16 22:09:57 +02:00
Make discarding invisible RGB values (cleanup alpha) the default.
Rename the flag to exact instead of the opposite cleanup_alpha. Add the flag to WebPConfig. Do the cleanup in the webp encoder library rather than the cwebp binary, this will be needed for the next stage: smarter alpha cleanup for better compression which cannot be done as a preprocessing due to depending on predictor choices in the encoder. Change-Id: I2fbf57f918a35f2da6186ef0b5d85e5fd0020eef
This commit is contained in:
committed by
James Zern
parent
b37b0179c5
commit
1f9be97c22
@ -321,6 +321,10 @@ int WebPEncode(const WebPConfig* config, WebPPicture* pic) {
|
||||
if (pic->width > WEBP_MAX_DIMENSION || pic->height > WEBP_MAX_DIMENSION)
|
||||
return WebPEncodingSetError(pic, VP8_ENC_ERROR_BAD_DIMENSION);
|
||||
|
||||
if (!config->exact) {
|
||||
WebPCleanupTransparentArea(pic);
|
||||
}
|
||||
|
||||
if (pic->stats != NULL) memset(pic->stats, 0, sizeof(*pic->stats));
|
||||
|
||||
if (!config->lossless) {
|
||||
|
Reference in New Issue
Block a user