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

Unified Diff: include/images/SkImageEncoder.h

Issue 15002004: add encodeData() to SkImageEncoder, and add encoding to SkImage (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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
Index: include/images/SkImageEncoder.h
diff --git a/include/images/SkImageEncoder.h b/include/images/SkImageEncoder.h
index 2965c88805101e88040079910123829294d9a323..3d3203fd1b3232e023022851d7e9d7576a41a785 100644
--- a/include/images/SkImageEncoder.h
+++ b/include/images/SkImageEncoder.h
@@ -11,6 +11,7 @@
#include "SkTypes.h"
class SkBitmap;
+class SkData;
class SkWStream;
class SkImageEncoder {
@@ -42,6 +43,16 @@ public:
* Calls the particular implementation's onEncode() method to
* actually do the encoding.
*/
+ SkData* encodeData(const SkBitmap&, int quality);
+
+ /**
+ * Encode bitmap 'bm' in the desired format, writing results to
+ * file 'file', at quality level 'quality' (which can be in range
+ * 0-100).
+ *
+ * Calls the particular implementation's onEncode() method to
+ * actually do the encoding.
+ */
bool encodeFile(const char file[], const SkBitmap& bm, int quality);
/**
« include/core/SkImage.h ('K') | « include/core/SkImage.h ('k') | src/image/SkImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698