mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 14:34:33 +02:00
Add Alpha Encode support from WebPEncode.
Extend WebP Encode functionality to encode Alpha data and produce bit-stream (RIFF+VP8X+ALPH+VP8) corresponding to WebP-Alpha. Change-Id: I983b4cd97be94a86a8e6d03b3b9c728db851bf48
This commit is contained in:
@ -250,8 +250,8 @@ static VP8Encoder* InitEncoder(const WebPConfig* const config,
|
||||
ResetFilterHeader(enc);
|
||||
ResetBoundaryPredictions(enc);
|
||||
|
||||
#ifdef WEBP_EXPERIMENTAL_FEATURES
|
||||
VP8EncInitAlpha(enc);
|
||||
#ifdef WEBP_EXPERIMENTAL_FEATURES
|
||||
VP8EncInitLayer(enc);
|
||||
#endif
|
||||
|
||||
@ -260,8 +260,8 @@ static VP8Encoder* InitEncoder(const WebPConfig* const config,
|
||||
|
||||
static void DeleteEncoder(VP8Encoder* enc) {
|
||||
if (enc) {
|
||||
#ifdef WEBP_EXPERIMENTAL_FEATURES
|
||||
VP8EncDeleteAlpha(enc);
|
||||
#ifdef WEBP_EXPERIMENTAL_FEATURES
|
||||
VP8EncDeleteLayer(enc);
|
||||
#endif
|
||||
free(enc);
|
||||
@ -335,8 +335,8 @@ int WebPEncode(const WebPConfig* const config, WebPPicture* const pic) {
|
||||
ok = VP8EncAnalyze(enc)
|
||||
&& VP8StatLoop(enc)
|
||||
&& VP8EncLoop(enc)
|
||||
#ifdef WEBP_EXPERIMENTAL_FEATURES
|
||||
&& VP8EncFinishAlpha(enc)
|
||||
#ifdef WEBP_EXPERIMENTAL_FEATURES
|
||||
&& VP8EncFinishLayer(enc)
|
||||
#endif
|
||||
&& VP8EncWrite(enc);
|
||||
|
Reference in New Issue
Block a user