diff options
author | lvandeve <lvandeve@gmail.com> | 2014-12-02 14:37:11 +0100 |
---|---|---|
committer | lvandeve <lvandeve@gmail.com> | 2014-12-02 14:37:11 +0100 |
commit | d6dcafc0cdc3d9f3ab9ee9ae820efe629ea65674 (patch) | |
tree | 7e5a27b953a03fa952496aabb6f29f1dff17dac5 | |
parent | 3212409222e5a51a5ed4062a27034933d3599464 (diff) |
Update example_png_info.cpp
-rw-r--r-- | example_png_info.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/example_png_info.cpp b/example_png_info.cpp index d9112b6..f5958d8 100644 --- a/example_png_info.cpp +++ b/example_png_info.cpp @@ -193,10 +193,15 @@ void displayAsciiArt(const std::vector<unsigned char>& image, unsigned w, unsign /* Show the filtertypes of each scanline in this PNG image. */ -void displayFilterTypes(const std::vector<unsigned char>& buffer) +void displayFilterTypes(const std::vector<unsigned char>& buffer, bool ignore_checksums) { //Get color type and interlace type lodepng::State state; + if(ignore_checksums) + { + state.decoder.ignore_crc = 1; + state.decoder.zlibsettings.ignore_adler32 = 1; + } unsigned w, h; unsigned error; error = lodepng_inspect(&w, &h, &state, &buffer[0], buffer.size()); @@ -338,7 +343,7 @@ int main(int argc, char *argv[]) /*list the chunks*/ std::cout << std::endl; displayChunkNames(buffer); std::cout << std::endl; - displayFilterTypes(buffer); + displayFilterTypes(buffer, ignore_checksums); std::cout << std::endl; displayAsciiArt(image, w, h); } |