add a WebPCleanupTransparentArea() method

to 'clean up' the fully-transparent area and make it more compressible
new cwebp flags: -alpha_cleanup (off by default, since gain is not 100% guaranteed)

Change-Id: I74d77e1915eee146584cd61c9c1132a41db922eb
This commit is contained in:
Pascal Massimino
2012-01-17 08:18:22 +00:00
committed by James Zern
parent 552c121715
commit 2e3e8b2ef5
5 changed files with 93 additions and 8 deletions

View File

@ -276,6 +276,11 @@ WEBP_EXTERN(int) WebPPictureImportBGR(
WEBP_EXTERN(int) WebPPictureImportBGRA(
WebPPicture* const picture, const uint8_t* const bgra, int bgra_stride);
// Helper function: given a width x height plane of YUV(A) samples
// (with stride 'stride'), clean-up the YUV samples under fully transparent
// area, to help compressibility (no guarantee, though).
WEBP_EXTERN(void) WebPCleanupTransparentArea(WebPPicture* const picture);
//------------------------------------------------------------------------------
// Main call