diff options
author | Francois Andriot <francois.andriot@free.fr> | 2013-08-15 21:16:04 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-08-15 21:16:04 +0200 |
commit | 3af9b39a4b28b38dcdd955fd23b3a0e3a1106c95 (patch) | |
tree | fd4c44e71966a7b5ed19d5b3f05d6bb9a014cd1d /tools/qvfb/qanimationwriter.cpp | |
parent | 13618b73e353f9016f7c890e6b51eda2229737d1 (diff) | |
download | tqt3-3af9b39a4b28b38dcdd955fd23b3a0e3a1106c95.tar.gz tqt3-3af9b39a4b28b38dcdd955fd23b3a0e3a1106c95.zip |
Fix FTBFS in qvfb with libpng >= 1.5
Diffstat (limited to 'tools/qvfb/qanimationwriter.cpp')
-rw-r--r-- | tools/qvfb/qanimationwriter.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/qvfb/qanimationwriter.cpp b/tools/qvfb/qanimationwriter.cpp index d3305e6bf..a7cb7635e 100644 --- a/tools/qvfb/qanimationwriter.cpp +++ b/tools/qvfb/qanimationwriter.cpp @@ -101,7 +101,15 @@ public: void writePNG(const TQImage& image) { +#if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=5 ) +#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 = 4; +#endif png_set_sig_bytes(png_ptr, 8); // Pretend we already wrote the sig png_set_IHDR(png_ptr, info_ptr, image.width(), image.height(), 8, image.hasAlphaBuffer() |