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

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

Issue 8631002: [ntp4] Use highest quality jpeg compression for thumbnail images. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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 | « chrome/browser/history/top_sites.cc ('k') | ui/gfx/image/image_util.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 10 matching lines...) Expand all
21 // returned Image. If there was an error creating the image, returns NULL. 21 // returned Image. If there was an error creating the image, returns NULL.
22 UI_EXPORT Image* ImageFromPNGEncodedData(const unsigned char* input, 22 UI_EXPORT Image* ImageFromPNGEncodedData(const unsigned char* input,
23 size_t input_size); 23 size_t input_size);
24 24
25 // Fills the |dst| vector with PNG-encoded bytes based on the given Image. 25 // Fills the |dst| vector with PNG-encoded bytes based on the given Image.
26 // Returns true if the Image was encoded successfully. 26 // Returns true if the Image was encoded successfully.
27 UI_EXPORT bool PNGEncodedDataFromImage(const Image& image, 27 UI_EXPORT bool PNGEncodedDataFromImage(const Image& image,
28 std::vector<unsigned char>* dst); 28 std::vector<unsigned char>* dst);
29 29
30 // Fills the |dst| vector with JPEG-encoded bytes based on the given Image. 30 // Fills the |dst| vector with JPEG-encoded bytes based on the given Image.
31 // |quality| determines the compression level, 0 == lowest, 100 == highest.
31 // Returns true if the Image was encoded successfully. 32 // Returns true if the Image was encoded successfully.
32 UI_EXPORT bool JPEGEncodedDataFromImage(const Image& image, 33 UI_EXPORT bool JPEGEncodedDataFromImage(const Image& image, int quality,
sky 2011/11/28 15:44:37 nit: each param on its own line.
csilv 2011/11/28 18:04:41 Done.
33 std::vector<unsigned char>* dst); 34 std::vector<unsigned char>* dst);
34 35
35 } 36 }
36 37
37 #endif // UI_GFX_IMAGE_IMAGE_UTIL_H_ 38 #endif // UI_GFX_IMAGE_IMAGE_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/history/top_sites.cc ('k') | ui/gfx/image/image_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698