1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef SKIA_EXT_SKIA_UTILS_IOS_H_
6 #define SKIA_EXT_SKIA_UTILS_IOS_H_
8 #include <CoreGraphics/CoreGraphics.h>
11 #include "third_party/skia/include/core/SkBitmap.h"
23 // Draws a CGImage into an SkBitmap of the given size.
24 SK_API SkBitmap
CGImageToSkBitmap(CGImageRef image
,
28 // Given an SkBitmap and a color space, return an autoreleased UIImage.
29 SK_API UIImage
* SkBitmapToUIImageWithColorSpace(const SkBitmap
& skia_bitmap
,
31 CGColorSpaceRef color_space
);
33 // Decodes all image representations inside the data into a vector of SkBitmaps.
34 // Returns a vector of all the successfully decoded representations or an empty
35 // vector if none can be decoded.
36 SK_API
std::vector
<SkBitmap
> ImageDataToSkBitmaps(NSData
* image_data
);
40 #endif // SKIA_EXT_SKIA_UTILS_IOS_H_