Fix FTBFS in qvfb with libpng >= 1.5

pull/1/head
Francois Andriot 11 years ago committed by Slávek Banko
parent 13618b73e3
commit 3af9b39a4b

@ -101,7 +101,15 @@ public:
void writePNG(const TQImage& image) 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; info_ptr->channels = 4;
#endif
png_set_sig_bytes(png_ptr, 8); // Pretend we already wrote the sig png_set_sig_bytes(png_ptr, 8); // Pretend we already wrote the sig
png_set_IHDR(png_ptr, info_ptr, image.width(), image.height(), png_set_IHDR(png_ptr, info_ptr, image.width(), image.height(),
8, image.hasAlphaBuffer() 8, image.hasAlphaBuffer()

Loading…
Cancel
Save