OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef TOOLS_IMAGEDIFF_IMAGE_DIFF_PNG_H_ |
| 6 #define TOOLS_IMAGEDIFF_IMAGE_DIFF_PNG_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 namespace image_diff_png { |
| 11 |
| 12 // Decode a PNG into an RGBA pixel array. |
| 13 bool DecodePNG(const unsigned char* input, size_t input_size, |
| 14 std::vector<unsigned char>* output, |
| 15 int* width, int* height); |
| 16 |
| 17 // Encode an RGBA pixel array into a PNG. |
| 18 bool EncodeRGBAPNG(const unsigned char* input, |
| 19 int width, |
| 20 int height, |
| 21 int row_byte_width, |
| 22 std::vector<unsigned char>* output); |
| 23 |
| 24 // Encode an BGRA pixel array into a PNG. |
| 25 bool EncodeBGRAPNG(const unsigned char* input, |
| 26 int width, |
| 27 int height, |
| 28 int row_byte_width, |
| 29 bool discard_transparency, |
| 30 std::vector<unsigned char>* output); |
| 31 |
| 32 } // namespace image_diff_png |
| 33 |
| 34 #endif // TOOLS_IMAGEDIFF_IMAGE_DIFF_PNG_H_ |
OLD | NEW |