diff options
author | OBATA Akio <obache@wizdas.com> | 2020-07-18 17:10:20 +0900 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2021-02-02 01:37:46 +0100 |
commit | b00b5ea1c5e0cecd50b928a5d88b3be8560c18e7 (patch) | |
tree | d17af31e79b71c2dae402c0edee3f81a5c24732e | |
parent | 2283b5627da2a075591f4376666781b5a4be4c23 (diff) | |
download | qt3-b00b5ea1c5e0cecd50b928a5d88b3be8560c18e7.tar.gz qt3-b00b5ea1c5e0cecd50b928a5d88b3be8560c18e7.zip |
Remove unwanted code for writing png
`info_ptr->channels` will be set in the next called `png_set_IHDR()`,
so it is no effect.
Signed-off-by: OBATA Akio <obache@wizdas.com>
-rw-r--r-- | src/kernel/qpngio.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/kernel/qpngio.cpp b/src/kernel/qpngio.cpp index bb76fcb..814ceec 100644 --- a/src/kernel/qpngio.cpp +++ b/src/kernel/qpngio.cpp @@ -568,19 +568,6 @@ bool QPNGImageWriter::writeImage(const QImage& image, int quality_in, int off_x_ png_set_write_fn(png_ptr, (void*)this, qpiw_write_fn, qpiw_flush_fn); -#if PNG_LIBPNG_VER>=10500 -#warning XXXtnn not too sure about this -/* -according to png.h, channels is only used on read, not writes, so we -should be able to comment this out. -*/ -#else /* LIBPNG 1.5 */ - info_ptr->channels = - (image.depth() == 32) - ? (image.hasAlphaBuffer() ? 4 : 3) - : 1; -#endif /* LIBPNG 1.5 */ - png_set_IHDR(png_ptr, info_ptr, image.width(), image.height(), image.depth() == 1 ? 1 : 8 /* per channel */, image.depth() == 32 |