Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Unified Diff: third_party/libwebp/enc/picture.c

Issue 10496016: Add RGBX BGRX support to WEBPImportPicture (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment nits. Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libwebp/README.chromium ('k') | third_party/libwebp/webp/encode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libwebp/enc/picture.c
diff --git a/third_party/libwebp/enc/picture.c b/third_party/libwebp/enc/picture.c
index 2f3c96e8ef0f3082abc6029826627f29c74aa650..56ff85f3621a03c9a842cab9a06bc32dc7d00dab 100644
--- a/third_party/libwebp/enc/picture.c
+++ b/third_party/libwebp/enc/picture.c
@@ -593,6 +593,20 @@ int WebPPictureImportBGRA(WebPPicture* const picture,
return Import(picture, rgba, rgba_stride, 4, 1, 1);
}
+int WebPPictureImportRGBX(WebPPicture* const picture,
+ const uint8_t* const rgba, int rgba_stride) {
+ picture->colorspace &= ~WEBP_CSP_ALPHA_BIT;
+ if (!WebPPictureAlloc(picture)) return 0;
+ return Import(picture, rgba, rgba_stride, 4, 0, 0);
+}
+
+int WebPPictureImportBGRX(WebPPicture* const picture,
+ const uint8_t* const rgba, int rgba_stride) {
+ picture->colorspace &= ~WEBP_CSP_ALPHA_BIT;
+ if (!WebPPictureAlloc(picture)) return 0;
+ return Import(picture, rgba, rgba_stride, 4, 1, 0);
+}
+
//------------------------------------------------------------------------------
// Simplest call:
« no previous file with comments | « third_party/libwebp/README.chromium ('k') | third_party/libwebp/webp/encode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698