1 // Copyright (c) 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 UI_GFX_IMAGE_IMAGE_SKIA_UTIL_MAC_H_
6 #define UI_GFX_IMAGE_IMAGE_SKIA_UTIL_MAC_H_
8 #include <ApplicationServices/ApplicationServices.h>
10 #include "ui/gfx/gfx_export.h"
13 typedef CGSize NSSize
;
15 typedef struct _NSSize NSSize
;
27 // Converts to ImageSkia from NSImage.
28 GFX_EXPORT
gfx::ImageSkia
ImageSkiaFromNSImage(NSImage
* image
);
30 // Resizes NSImage to |size| DIP and then converts to ImageSkia.
31 GFX_EXPORT
gfx::ImageSkia
ImageSkiaFromResizedNSImage(NSImage
* image
,
34 // Converts to NSImage from ImageSkia.
35 GFX_EXPORT NSImage
* NSImageFromImageSkia(const gfx::ImageSkia
& image_skia
);
37 // Converts to NSImage from given ImageSkia and a color space.
38 GFX_EXPORT NSImage
* NSImageFromImageSkiaWithColorSpace(
39 const gfx::ImageSkia
& image_skia
,
40 CGColorSpaceRef color_space
);
44 #endif // UI_GFX_IMAGE_IMAGE_SKIA_UTIL_MAC_H_