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

Side by Side Diff: tools/imagediff/image_diff_png.h

Issue 21202003: Move simple png encoding for image_diff into tools/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android_webview third_party_whitelist.txt Created 7 years, 4 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 | « tools/imagediff/image_diff.gyp ('k') | tools/imagediff/image_diff_png.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) 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 WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_ 5 #ifndef TOOLS_IMAGEDIFF_IMAGE_DIFF_PNG_H_
6 #define WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_ 6 #define TOOLS_IMAGEDIFF_IMAGE_DIFF_PNG_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 namespace webkit_support { 11 namespace image_diff_png {
12 12
13 // Decode a PNG into an RGBA pixel array. 13 // Decode a PNG into an RGBA pixel array.
14 bool DecodePNG(const unsigned char* input, size_t input_size, 14 bool DecodePNG(const unsigned char* input, size_t input_size,
15 std::vector<unsigned char>* output, 15 std::vector<unsigned char>* output,
16 int* width, int* height); 16 int* width, int* height);
17 17
18 // Encode an RGBA pixel array into a PNG. 18 // Encode an RGBA pixel array into a PNG.
19 bool EncodeRGBAPNG(const unsigned char* input, 19 bool EncodeRGBAPNG(const unsigned char* input,
20 int width, 20 int width,
21 int height, 21 int height,
22 int row_byte_width, 22 int row_byte_width,
23 std::vector<unsigned char>* output); 23 std::vector<unsigned char>* output);
24 24
25 // Encode an BGRA pixel array into a PNG. 25 // Encode an BGRA pixel array into a PNG.
26 bool EncodeBGRAPNG(const unsigned char* input, 26 bool EncodeBGRAPNG(const unsigned char* input,
27 int width, 27 int width,
28 int height, 28 int height,
29 int row_byte_width, 29 int row_byte_width,
30 bool discard_transparency, 30 bool discard_transparency,
31 std::vector<unsigned char>* output); 31 std::vector<unsigned char>* output);
32 32
33 bool EncodeBGRAPNGWithChecksum(const unsigned char* input, 33 } // namespace image_diff_png
34 int width,
35 int height,
36 int row_byte_width,
37 bool discard_transparency,
38 const std::string& checksum,
39 std::vector<unsigned char>* output);
40 34
41 } // namespace webkit_support 35 #endif // TOOLS_IMAGEDIFF_IMAGE_DIFF_PNG_H_
42
43 #endif // WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_
OLDNEW
« no previous file with comments | « tools/imagediff/image_diff.gyp ('k') | tools/imagediff/image_diff_png.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698