diff options
author | dgp <dgp@users.sourceforge.net> | 2015-05-05 19:38:12 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2015-05-05 19:38:12 (GMT) |
commit | 307c22d55990d4b2ff2981d1a37ef39f88aca78b (patch) | |
tree | c3e41a4c66546f44f48d553fbf447659aa824e28 /generic/tkImgPNG.c | |
parent | 22ebc724fe95500c9c01576ef1f2fc97f849a56a (diff) | |
parent | d1dd76e66ac3f2e94f74fa863b4f90c76e278db4 (diff) | |
download | tk-307c22d55990d4b2ff2981d1a37ef39f88aca78b.zip tk-307c22d55990d4b2ff2981d1a37ef39f88aca78b.tar.gz tk-307c22d55990d4b2ff2981d1a37ef39f88aca78b.tar.bz2 |
[06c3fcb136] ImgGetPhoto() had some code misplaced in an earlier commit
so that it failed to tell all callers when the alpha channel was fully opaque.
This triggered another bug in the PNG writer where the alpha vs. non-alpha
format choice was broken and confused, leading to corrupt png image files.
Diffstat (limited to 'generic/tkImgPNG.c')
-rw-r--r-- | generic/tkImgPNG.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tkImgPNG.c b/generic/tkImgPNG.c index 8a740d2..d6a706a 100644 --- a/generic/tkImgPNG.c +++ b/generic/tkImgPNG.c @@ -3345,7 +3345,7 @@ EncodePNG( pngPtr->colorType = PNG_COLOR_RGBA; pngPtr->bytesPerPixel = 4; } else { - pngPtr->colorType = PNG_COLOR_RGBA; + pngPtr->colorType = PNG_COLOR_RGB; pngPtr->bytesPerPixel = 3; } } else { |