| Index: include/core/SkImageEncoder.h
|
| diff --git a/include/core/SkImageEncoder.h b/include/core/SkImageEncoder.h
|
| index 4d4d2a83c0f18a0bd31a8d42bd64d947703a8126..0a850fcdcb47b545c5dbd28f66aaf6b06663c9c5 100644
|
| --- a/include/core/SkImageEncoder.h
|
| +++ b/include/core/SkImageEncoder.h
|
| @@ -13,6 +13,7 @@
|
|
|
| class SkBitmap;
|
| class SkData;
|
| +class SkImage;
|
| class SkWStream;
|
|
|
| class SkImageEncoder {
|
| @@ -60,6 +61,16 @@ public:
|
| bool encodeStream(SkWStream* stream, const SkBitmap& bm, int quality);
|
|
|
| static SkData* EncodeData(const SkBitmap&, Type, int quality);
|
| +
|
| + /**
|
| + * Encode the image's pixels and return the result as a new SkData, which
|
| + * the caller must manage (i.e. call unref() when they are done).
|
| + *
|
| + * If the image type cannot be encoded, or the requested encoder type is
|
| + * not supported, this will return NULL.
|
| + */
|
| + static SkData* EncodeData(const SkImage&, Type, int quality);
|
| +
|
| static bool EncodeFile(const char file[], const SkBitmap&, Type,
|
| int quality);
|
| static bool EncodeStream(SkWStream*, const SkBitmap&, Type,
|
|
|