diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-08-23 11:41:10 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-08-23 11:41:10 (GMT) |
commit | a3c3949ae693b72a6d5ffddd03fa8afc76c56b99 (patch) | |
tree | d8ecd2387568814a68bf8b8713f3abed9ff9f275 /src/3rdparty/libpng/example.c | |
parent | bc3e0a7e5f37ecf6f2b393107eb25e4091e05407 (diff) | |
parent | a28832bb61e7e60ac0fb856daf27b78ff1728520 (diff) | |
download | Qt-a3c3949ae693b72a6d5ffddd03fa8afc76c56b99.zip Qt-a3c3949ae693b72a6d5ffddd03fa8afc76c56b99.tar.gz Qt-a3c3949ae693b72a6d5ffddd03fa8afc76c56b99.tar.bz2 |
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt-symbian-team
* 'master' of git://scm.dev.nokia.troll.no/qt/qt-symbian-team: (103 commits)
Fix non-ascii name issues in ICD.
Compile fix for Symbian 5th and earlier
Improve documentation for QDeclarativeView::setSource()
fix copying webkit guide under windows
Symbian: Fix backspace on empty lines of multiline textedits
Handle CloseSoftwareInputPanel event in QCoeFepInputContext
uikit: Fixes for Open GL ES 1 and for pre-3GS devices
uikit: Fix warning.
Use thumb instructions for uikit
Fix compilation with thumb2.
Update uikit README: svg works, warn about thumb
Fix delayed password masking mid-string.
Disabled splitscreen translation still moves screen
Fix bidi reordering of RTL text with embedded images
Doc: Fixed qdoc warnings.
don't crash when destroying codec list
Fixed infinite loop when loading certain SVGs.
Fix a crash in a11y introduced by d289e54f2d2aa066cb3
Doc: Fixed qdoc warnings.
test: Fix `tst_qfiledialog' in a namespaced build
...
Diffstat (limited to 'src/3rdparty/libpng/example.c')
-rw-r--r-- | src/3rdparty/libpng/example.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/3rdparty/libpng/example.c b/src/3rdparty/libpng/example.c index cd3682f..c0d27f4 100644 --- a/src/3rdparty/libpng/example.c +++ b/src/3rdparty/libpng/example.c @@ -2,7 +2,7 @@ #if 0 /* in case someone actually tries to compile this */ /* example.c - an example of using libpng - * Last changed in libpng 1.5.0 [January 6, 2011] + * Last changed in libpng 1.5.4 [July 7, 2011] * This file has been placed in the public domain by the authors. * Maintained 1998-2011 Glenn Randers-Pehrson * Maintained 1996, 1997 Andreas Dilger) @@ -22,6 +22,10 @@ * see also the programs in the contrib directory. */ +#define _POSIX_SOURCE 1 /* libpng and zlib are POSIX-compliant. You may + * change this if your application uses non-POSIX + * extensions. */ + #include "png.h" /* The png_jmpbuf() macro, used in error handling, became available in @@ -183,8 +187,15 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */ * are mutually exclusive. */ - /* Tell libpng to strip 16 bit/color files down to 8 bits/color */ + /* Tell libpng to strip 16 bit/color files down to 8 bits/color. + * Use accurate scaling if it's available, otherwise just chop off the + * low byte. + */ +#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED + png_set_scale_16(png_ptr); +#else png_set_strip_16(png_ptr); +#endif /* Strip alpha bytes from the input data without combining with the * background (not recommended). |