Evict resources from resource pool after timeout
[chromium-blink-merge.git] / tools / imagediff / image_diff_png.h
blobc371337f99d30e9c188f70ccb1905ccde35eda78
1 // Copyright 2013 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 TOOLS_IMAGEDIFF_IMAGE_DIFF_PNG_H_
6 #define TOOLS_IMAGEDIFF_IMAGE_DIFF_PNG_H_
8 #include <string>
9 #include <vector>
11 namespace image_diff_png {
13 // Decode a PNG into an RGBA pixel array.
14 bool DecodePNG(const unsigned char* input, size_t input_size,
15 std::vector<unsigned char>* output,
16 int* width, int* height);
18 // Encode an RGBA pixel array into a PNG.
19 bool EncodeRGBAPNG(const unsigned char* input,
20 int width,
21 int height,
22 int row_byte_width,
23 std::vector<unsigned char>* output);
25 // Encode an BGRA pixel array into a PNG.
26 bool EncodeBGRAPNG(const unsigned char* input,
27 int width,
28 int height,
29 int row_byte_width,
30 bool discard_transparency,
31 std::vector<unsigned char>* output);
33 } // namespace image_diff_png
35 #endif // TOOLS_IMAGEDIFF_IMAGE_DIFF_PNG_H_