mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-16 22:09:57 +02:00
introduce a generic WebPPictureHasTransparency() function
VP8-lossy will now avoid writing an ALPH chunk if the alpha values are trivial. + changed DumpPicture() accordingly in cwebp + prevented the -d option to be active with lossless (DumpPicture wouldn't work). Change-Id: I34fdb108a2b6207e93fa6cd00b1d2509a8e1dc4b
This commit is contained in:
@ -281,7 +281,7 @@ static int EncodeAlpha(const uint8_t* data, int width, int height, int stride,
|
||||
// Main calls
|
||||
|
||||
void VP8EncInitAlpha(VP8Encoder* enc) {
|
||||
enc->has_alpha_ = (enc->pic_->a != NULL);
|
||||
enc->has_alpha_ = WebPPictureHasTransparency(enc->pic_);
|
||||
enc->alpha_data_ = NULL;
|
||||
enc->alpha_data_size_ = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user