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

Side by Side Diff: ui/gfx/image/image_util.h

Issue 23498059: Remove last dependencies on ui/base from ui/gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: last rebase Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/image/image_skia_util_mac.h ('k') | ui/gfx/insets.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_IMAGE_IMAGE_UTIL_H_ 5 #ifndef UI_GFX_IMAGE_IMAGE_UTIL_H_
6 #define UI_GFX_IMAGE_IMAGE_UTIL_H_ 6 #define UI_GFX_IMAGE_IMAGE_UTIL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "ui/gfx/gfx_export.h" 11 #include "ui/gfx/gfx_export.h"
12 12
13 namespace gfx { 13 namespace gfx {
14 class Image; 14 class Image;
15 } 15 }
16 16
17 namespace gfx { 17 namespace gfx {
18 18
19 // Creates an image from the given JPEG-encoded input. If there was an error 19 // Creates an image from the given JPEG-encoded input. If there was an error
20 // creating the image, returns an IsEmpty() Image. 20 // creating the image, returns an IsEmpty() Image.
21 UI_EXPORT Image ImageFrom1xJPEGEncodedData(const unsigned char* input, 21 GFX_EXPORT Image ImageFrom1xJPEGEncodedData(const unsigned char* input,
22 size_t input_size); 22 size_t input_size);
23 23
24 // Fills the |dst| vector with JPEG-encoded bytes of the 1x representation of 24 // Fills the |dst| vector with JPEG-encoded bytes of the 1x representation of
25 // the given image. 25 // the given image.
26 // Returns true if the image has a 1x representation and the 1x representation 26 // Returns true if the image has a 1x representation and the 1x representation
27 // was encoded successfully. 27 // was encoded successfully.
28 // |quality| determines the compression level, 0 == lowest, 100 == highest. 28 // |quality| determines the compression level, 0 == lowest, 100 == highest.
29 // Returns true if the Image was encoded successfully. 29 // Returns true if the Image was encoded successfully.
30 UI_EXPORT bool JPEG1xEncodedDataFromImage(const Image& image, 30 GFX_EXPORT bool JPEG1xEncodedDataFromImage(const Image& image,
31 int quality, 31 int quality,
32 std::vector<unsigned char>* dst); 32 std::vector<unsigned char>* dst);
33 33
34 } // namespace gfx 34 } // namespace gfx
35 35
36 #endif // UI_GFX_IMAGE_IMAGE_UTIL_H_ 36 #endif // UI_GFX_IMAGE_IMAGE_UTIL_H_
OLDNEW
« no previous file with comments | « ui/gfx/image/image_skia_util_mac.h ('k') | ui/gfx/insets.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698