diff --git a/libvips/foreign/heifsave.c b/libvips/foreign/heifsave.c index 3256a8a3..cf9af771 100644 --- a/libvips/foreign/heifsave.c +++ b/libvips/foreign/heifsave.c @@ -390,8 +390,8 @@ vips_foreign_save_heif_build( VipsObject *object ) } chroma = heif->subsample_mode == VIPS_FOREIGN_SUBSAMPLE_OFF || - ( heif->subsample_mode == VIPS_FOREIGN_SUBSAMPLE_AUTO && - heif->Q >= 90 ) ? "444" : "420"; + (heif->subsample_mode == VIPS_FOREIGN_SUBSAMPLE_AUTO && + heif->Q >= 90) ? "444" : "420"; error = heif_encoder_set_parameter_string( heif->encoder, "chroma", chroma ); if( error.code && diff --git a/libvips/foreign/vipspng.c b/libvips/foreign/vipspng.c index ee517f79..a7bb6168 100644 --- a/libvips/foreign/vipspng.c +++ b/libvips/foreign/vipspng.c @@ -793,11 +793,8 @@ vips__png_header_source( VipsSource *source, VipsImage *out, Read *read; if( !(read = read_new( source, out, TRUE, unlimited )) || - png2vips_header( read, out ) ) { - vips_error( "png2vips", _( "unable to read source %s" ), - vips_connection_nick( VIPS_CONNECTION( source ) ) ); + png2vips_header( read, out ) ) return( -1 ); - } vips_source_minimise( source ); @@ -812,11 +809,8 @@ vips__png_read_source( VipsSource *source, VipsImage *out, if( !(read = read_new( source, out, fail_on, unlimited )) || png2vips_image( read, out ) || - vips_source_decode( source ) ) { - vips_error( "png2vips", _( "unable to read source %s" ), - vips_connection_nick( VIPS_CONNECTION( source ) ) ); + vips_source_decode( source ) ) return( -1 ); - } return( 0 ); }