diff options
author | Tobias Frost <tobi@debian.org> | 2016-05-18 02:19:55 (EDT) |
---|---|---|
committer | Gianfranco Costamagna <costamagnagianfranco@yahoo.it> | 2016-05-18 02:24:28 (EDT) |
commit | 6ba6e1287bbd875cd14095e2baf36a978d88c32e (patch) | |
tree | 24560a6a3a8585a27c3586522bd6d558179ab94e /xcf2png.c | |
parent | eed1888ade8274b106b06a55af29ef9cd33c5917 (diff) | |
download | xcftools-6ba6e1287bbd875cd14095e2baf36a978d88c32e.zip xcftools-6ba6e1287bbd875cd14095e2baf36a978d88c32e.tar.gz xcftools-6ba6e1287bbd875cd14095e2baf36a978d88c32e.tar.bz2 |
Fix libpng16 issue, png_set_filler is invalid for low bit depth gray output, from Debian
Diffstat (limited to 'xcf2png.c')
-rw-r--r-- | xcf2png.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -208,8 +208,11 @@ init_output(void) #endif break ; case PNG_COLOR_TYPE_GRAY: - png_set_filler(libpng,0,PNG_FILLER_AFTER); + { + // only supported with more than 8 bits, otherwise emit error: png_set_filler is invalid for low bit depth gray output' + if (bit_depth >= 8) png_set_filler(libpng,0,PNG_FILLER_AFTER); break ; + } case PNG_COLOR_TYPE_GRAY_ALPHA: case PNG_COLOR_TYPE_PALETTE: break ; |