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

Unified Diff: components/suggestions/image_encoder.h

Issue 641513003: [Suggestions] Introduce a different image encoder/decoder for iOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest Created 6 years, 2 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: components/suggestions/image_encoder.h
diff --git a/components/suggestions/image_encoder.h b/components/suggestions/image_encoder.h
new file mode 100644
index 0000000000000000000000000000000000000000..f32314ab0e052c9528fb7c0470a50aa7dd555e0d
--- /dev/null
+++ b/components/suggestions/image_encoder.h
@@ -0,0 +1,24 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_SUGGESTIONS_IMAGE_ENCODER_H_
+#define COMPONENTS_SUGGESTIONS_IMAGE_ENCODER_H_
+
+#include <vector>
+
+class SkBitmap;
+
+namespace suggestions {
+
+// From encoded bytes to SkBitmap. It's the caller's responsibility to delete
+// the bitmap.
+SkBitmap* DecodeJPEGToSkBitmap(const std::vector<unsigned char>& encoded_data);
+
+// From SkBitmap to a vector of JPEG-encoded bytes, |dst|.
+bool EncodeSkBitmapToJPEG(const SkBitmap& bitmap,
+ std::vector<unsigned char>* dest);
+
+} // namespace suggestions
+
+#endif // COMPONENTS_SUGGESTIONS_IMAGE_ENCODER_H_

Powered by Google App Engine
This is Rietveld 408576698