diff --git a/examples/cwebp.c b/examples/cwebp.c index cb038bfb..6bb4baed 100644 --- a/examples/cwebp.c +++ b/examples/cwebp.c @@ -876,6 +876,9 @@ int main(int argc, const char *argv[]) { goto Error; } picture.progress_hook = (show_progress && !quiet) ? ProgressReport : NULL; + if (keep_alpha == 2) { + WebPCleanupTransparentArea(&picture); + } if (verbose) { const double read_time = StopwatchReadAndReset(&stop_watch); diff --git a/examples/pngdec.c b/examples/pngdec.c index 77ae94e9..e30df0a3 100644 --- a/examples/pngdec.c +++ b/examples/pngdec.c @@ -274,9 +274,6 @@ int ReadPNG(FILE* in_file, WebPPicture* const pic, int keep_alpha, if (!ok) { goto Error; } - if (has_alpha && keep_alpha == 2) { - WebPCleanupTransparentArea(pic); - } End: return ok; diff --git a/examples/tiffdec.c b/examples/tiffdec.c index 3206fd68..81cb7e46 100644 --- a/examples/tiffdec.c +++ b/examples/tiffdec.c @@ -108,9 +108,6 @@ int ReadTIFF(const char* const filename, } if (ok) { - if (keep_alpha == 2) { - WebPCleanupTransparentArea(pic); - } if (metadata != NULL) { ok = ExtractMetadataFromTIFF(tif, metadata); if (!ok) { diff --git a/examples/wicdec.c b/examples/wicdec.c index 940801d9..c9e93acf 100644 --- a/examples/wicdec.c +++ b/examples/wicdec.c @@ -257,9 +257,6 @@ int ReadPictureWithWIC(const char* const filename, hr = E_FAIL; } if (SUCCEEDED(hr)) { - if (has_alpha && keep_alpha == 2) { - WebPCleanupTransparentArea(pic); - } if (metadata != NULL) { hr = ExtractMetadata(pFactory, pFrame, metadata); if (FAILED(hr)) {