Chromium Code Reviews| 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..9c8e06c70dd6594f4ff2c968b847616f5a312d2f 100644 |
| --- a/third_party/libwebp/enc/picture.c |
| +++ b/third_party/libwebp/enc/picture.c |
| @@ -593,6 +593,22 @@ int WebPPictureImportBGRA(WebPPicture* const picture, |
| return Import(picture, rgba, rgba_stride, 4, 1, 1); |
| } |
| +int WebPPictureImportRGBX(WebPPicture* const picture, |
| + const uint8_t* const rgbx, int rgbx_stride) { |
| + // In libwebp.next, assert picture->user_argb_input here. |
|
skal
2012/06/04 04:34:55
not necessarily. What if you want to convert to YU
|
| + picture->colorspace &= ~WEBP_CSP_ALPHA_BIT; |
| + if (!WebPPictureAlloc(picture)) return 0; |
| + return Import(picture, rgbx, rgbx_stride, 4, 0, 0); |
| +} |
| + |
| +int WebPPictureImportBGRX(WebPPicture* const picture, |
| + const uint8_t* const rgbx, int rgbx_stride) { |
| + // In libwebp.next, assert picture->user_argb_input here. |
|
skal
2012/06/04 04:34:55
here too
|
| + picture->colorspace &= ~WEBP_CSP_ALPHA_BIT; |
| + if (!WebPPictureAlloc(picture)) return 0; |
| + return Import(picture, rgbx, rgbx_stride, 4, 1, 0); |
| +} |
| + |
| //------------------------------------------------------------------------------ |
| // Simplest call: |