Merge remote-tracking branch 'origin/7.28' into 7.28

This commit is contained in:
John Cupitt 2012-03-15 11:45:37 +00:00
commit 3b583d7744
3 changed files with 19 additions and 6 deletions

View File

@ -1,3 +1,5 @@
13/3/12 started 7.28.2
13/3/12 started 7.28.1
- add ICC profile read/write for png files

View File

@ -2,7 +2,7 @@
# also update the version number in the m4 macros below
AC_INIT(vips, 7.28.1, vipsip@jiscmail.ac.uk)
AC_INIT(vips, 7.28.2, vipsip@jiscmail.ac.uk)
# required for gobject-introspection
AC_PREREQ(2.62)
@ -15,7 +15,7 @@ AC_CONFIG_MACRO_DIR([m4])
# user-visible library versioning
m4_define([vips_major_version], [7])
m4_define([vips_minor_version], [28])
m4_define([vips_micro_version], [1])
m4_define([vips_micro_version], [2])
m4_define([vips_version],
[vips_major_version.vips_minor_version.vips_micro_version])
@ -35,7 +35,7 @@ VIPS_VERSION_STRING=$VIPS_VERSION-`date`
# interface changes not backwards compatible?: reset age to 0
LIBRARY_CURRENT=31
LIBRARY_REVISION=1
LIBRARY_REVISION=2
LIBRARY_AGE=16
# patched into include/vips/version.h

View File

@ -69,8 +69,8 @@
*/
/*
*/
#define DEBUG
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
@ -259,13 +259,24 @@ png2vips_header( Read *read, VipsImage *out )
interpretation = VIPS_INTERPRETATION_sRGB;
}
/* Expand palette images, expand transparency too.
/* Expand palette images.
*/
if( color_type == PNG_COLOR_TYPE_PALETTE )
png_set_palette_to_rgb( read->pPng );
if( png_get_valid( read->pPng, read->pInfo, PNG_INFO_tRNS ) )
/* Expand transparency images too.
*/
if( png_get_valid( read->pPng, read->pInfo, PNG_INFO_tRNS ) ) {
png_set_tRNS_to_alpha( read->pPng );
/* Some PNGs have an alpha but do not set color_type correctly
* .. make sure we add space for an alpha.
*/
if( color_type == PNG_COLOR_TYPE_GRAY ||
color_type == PNG_COLOR_TYPE_RGB )
bands += 1;
}
/* Expand <8 bit images to full bytes.
*/
if( color_type == PNG_COLOR_TYPE_GRAY &&