diff options
author | Bernhard Rosenkraenzer <br@blankpage.ch> | 2011-01-17 15:32:39 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2011-01-17 15:33:22 (GMT) |
commit | 4d570be67303f5b80ed0377ac7307afd8bc18643 (patch) | |
tree | 635824e93fcab406acb35d05102ba26d031bbea3 /tools | |
parent | 7a7c36d80c1f84ca493c29bf8d4e0bd447740b8d (diff) | |
download | Qt-4d570be67303f5b80ed0377ac7307afd8bc18643.zip Qt-4d570be67303f5b80ed0377ac7307afd8bc18643.tar.gz Qt-4d570be67303f5b80ed0377ac7307afd8bc18643.tar.bz2 |
Make qvfb compile (and work) with libpng 1.5
In libpng >= 1.5.0, the png_info struct is no longer exported
Merge-request: 1023
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qvfb/qanimationwriter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/qvfb/qanimationwriter.cpp b/tools/qvfb/qanimationwriter.cpp index 74a7b5f..c91a916 100644 --- a/tools/qvfb/qanimationwriter.cpp +++ b/tools/qvfb/qanimationwriter.cpp @@ -112,9 +112,11 @@ public: void writePNG(const QImage& image) { -#ifndef QT_LINUXBASE +#if !defined(QT_LINUXBASE) && \ + (PNG_LIBPNG_VER_MAJOR < 1 || (PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR <= 4)) // LSB disallows accessing the info_ptr directly. LSB's png_set_IHDR sets - // the channels anyways, so just comment it out for LSB usage + // the channels anyways, so just comment it out for LSB usage. + // In libpng >= 1.5, the png_info struct is no longer exported. info_ptr->channels = 4; #endif png_set_sig_bytes(png_ptr, 8); // Pretend we already wrote the sig |