diff options
author | SlowRiot <rain.backnet@gmail.com> | 2014-11-27 04:13:51 +0000 |
---|---|---|
committer | SlowRiot <rain.backnet@gmail.com> | 2014-11-27 04:13:51 +0000 |
commit | e205cb35be0d53730ee8c8c8082255d3f50c5d12 (patch) | |
tree | 1d924292d24581ebad4bff1c7afd5437fd2f60b0 /pngdetail.cpp | |
parent | e14137419c1d444ed61a6789bd3dd6942cdc7405 (diff) | |
parent | 71b8c3ad7338b41b43676ad4212f6d820d4ce193 (diff) |
Merge branch 'master' of https://github.com/lvandeve/lodepng
# By Lode (10) and others
# Via Lode
* 'master' of https://github.com/lvandeve/lodepng:
fix for C
fix examples
better bitpointer checks
small tweaks
Update lodepng.h
Update lodepng.cpp
avoid too big pixel sizes
predict idat size correctly for interlaced images
unit test was a bit slow like that
fix bug with encoding transparent single-pixel image
protect against invalid chunk lengths in some tools
fix pngdetail.cpp
collapsing duplicate branch
do not check unsigned windowsize for < 0
Conflicts:
lodepng.cpp
Diffstat (limited to 'pngdetail.cpp')
-rw-r--r-- | pngdetail.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pngdetail.cpp b/pngdetail.cpp index 71e7aaf..98f03d2 100644 --- a/pngdetail.cpp +++ b/pngdetail.cpp @@ -304,7 +304,12 @@ Show the filtertypes of each scanline in this PNG image. void displayFilterTypes(const std::vector<unsigned char>& buffer) { std::vector<std::vector<unsigned char> > types; - lodepng::getFilterTypesInterlaced(types, buffer); + unsigned error = lodepng::getFilterTypesInterlaced(types, buffer); + if(error) + { + std::cout << "Error getting filter types" << std::endl; + return; + } if(types.size() == 7) { @@ -338,7 +343,6 @@ void displayPalette(const std::vector<unsigned char>& buffer) std::vector<unsigned char> out; state.decoder.color_convert = 0; - state.decoder.fix_png = 1; lodepng::decode(out, w, h, state, buffer); @@ -386,7 +390,6 @@ void displayPalettePixels(const std::vector<unsigned char>& buffer) std::vector<unsigned char> out; state.decoder.color_convert = 0; - state.decoder.fix_png = 1; lodepng::decode(out, w, h, state, buffer); |