Merge branch '8.10'

This commit is contained in:
John Cupitt 2020-09-06 13:02:34 +01:00
commit 17c16c0bb6
3 changed files with 13 additions and 5 deletions

View File

@ -1,6 +1,9 @@
14/8/20 started 8.11
- add vips_jpegload_source() and vips_svgload_source() to public C API
6/9/20 started 8.10.2
- update magicksave/load profile handling [kelilevi]
9/8/20 started 8.10.1
- fix markdown -> xml conversion in doc generation
- remove typedef redefinitions to please old gccs

View File

@ -686,13 +686,13 @@ magick_set_vips_profile_cb( Image *image,
char name_text[256];
VipsBuf vips_name = VIPS_BUF_STATIC( name_text );
if( strcmp( name, "XMP" ) == 0 )
if( strcasecmp( name, "XMP" ) == 0 )
vips_buf_appendf( &vips_name, VIPS_META_XMP_NAME );
else if( strcmp( name, "IPTC" ) == 0 )
else if( strcasecmp( name, "IPTC" ) == 0 )
vips_buf_appendf( &vips_name, VIPS_META_IPTC_NAME );
else if( strcmp( name, "ICM" ) == 0 )
else if( strcasecmp( name, "ICC" ) == 0 )
vips_buf_appendf( &vips_name, VIPS_META_ICC_NAME );
else if( strcmp( name, "EXIF" ) == 0 )
else if( strcasecmp( name, "EXIF" ) == 0 )
vips_buf_appendf( &vips_name, VIPS_META_EXIF_NAME );
else
vips_buf_appendf( &vips_name, "magickprofile-%s", name );
@ -736,7 +736,7 @@ magick_set_magick_profile_cb( VipsImage *im,
else if( strcmp( name, VIPS_META_IPTC_NAME ) == 0 )
vips_buf_appendf( &buf, "IPTC" );
else if( strcmp( name, VIPS_META_ICC_NAME ) == 0 )
vips_buf_appendf( &buf, "ICM" );
vips_buf_appendf( &buf, "ICC" );
else if( strcmp( name, VIPS_META_EXIF_NAME ) == 0 )
vips_buf_appendf( &buf, "EXIF" );
else if( vips_isprefix( "magickprofile-", name ) )

View File

@ -580,6 +580,10 @@ class TestForeign:
assert im.width == 16
assert im.height == 16
# load should see metadata like eg. icc profiles
im = pyvips.Image.magickload(JPEG_FILE)
assert len(im.get("icc-profile-data")) == 564
# added in 8.7
@skip_if_no("magicksave")
def test_magicksave(self):
@ -597,6 +601,7 @@ class TestForeign:
assert self.colour.bands == x.bands
max_diff = (self.colour - x).abs().max()
assert max_diff < 60
assert len(x.get("icc-profile-data")) == 564
self.save_load_buffer("magicksave_buffer", "magickload_buffer",
self.colour, 60, format="JPG")