mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-15 21:39:59 +02:00
add -near_lossless [0..100] experimental option
This compresses the uimage using lossless compression and controlable decimating pre-process. Code is under WEBP_EXPERIMENTAL_FEATURE while it's being experimented with. Change-Id: I8b7f4cfcc3c6afc52a556102842bdbb045ed5ee8
This commit is contained in:
@ -362,6 +362,11 @@ int WebPEncode(const WebPConfig* config, WebPPicture* pic) {
|
||||
}
|
||||
ok &= DeleteVP8Encoder(enc); // must always be called, even if !ok
|
||||
} else {
|
||||
if (config->near_lossless > 0 &&
|
||||
!VP8ApplyNearLossless(pic->width, pic->height,
|
||||
pic->argb, config->near_lossless)) {
|
||||
return 0;
|
||||
}
|
||||
// Make sure we have ARGB samples.
|
||||
if (pic->argb == NULL && !WebPPictureYUVAToARGB(pic)) {
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user