diff --git a/ChangeLog b/ChangeLog index 28c213b3d6..0626bd57c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -10/1/23 started 8.15 +18/10/23 8.15.0-rc1 - add support for target_clones attribute [lovell] * use with (un)premultiply for ~10% perf gain on AVX CPUs diff --git a/libvips/foreign/exif.c b/libvips/foreign/exif.c index 1b7cc77a6b..b11b604331 100644 --- a/libvips/foreign/exif.c +++ b/libvips/foreign/exif.c @@ -296,7 +296,10 @@ vips_exif_to_s(ExifData *ed, ExifEntry *entry, VipsBuf *buf) int iv; ExifRational rv; ExifSRational srv; - char txt[256]; + char txt[256], *value; + + value = g_utf8_make_valid( + exif_entry_get_value(entry, txt, 256), -1); if (entry->format == EXIF_FORMAT_ASCII) { /* libexif does not null-terminate strings. Copy out and add @@ -306,7 +309,10 @@ vips_exif_to_s(ExifData *ed, ExifEntry *entry, VipsBuf *buf) memcpy(txt, entry->data, len); txt[len] = '\0'; - vips_buf_appendf(buf, "%s ", txt); + + char *utf8 = g_utf8_make_valid(txt, -1); + vips_buf_appendf(buf, "%s ", utf8); + g_free(utf8); } else if (entry->components < 10 && !vips_exif_get_int(ed, entry, 0, &iv)) { @@ -332,14 +338,15 @@ vips_exif_to_s(ExifData *ed, ExifEntry *entry, VipsBuf *buf) } } else - vips_buf_appendf(buf, "%s ", - exif_entry_get_value(entry, txt, 256)); + vips_buf_appendf(buf, "%s ", value); vips_buf_appendf(buf, "(%s, %s, %lu components, %d bytes)", - exif_entry_get_value(entry, txt, 256), + value, exif_format_get_name(entry->format), entry->components, entry->size); + + g_free(value); } typedef struct _VipsExifParams { diff --git a/libvips/foreign/heifsave.c b/libvips/foreign/heifsave.c index bf796ab3bd..ffd50a6c2b 100644 --- a/libvips/foreign/heifsave.c +++ b/libvips/foreign/heifsave.c @@ -465,10 +465,16 @@ vips_foreign_save_heif_write(struct heif_context *ctx, struct heif_error error; +#ifdef HAVE_HEIF_ERROR_SUCCESS + error = heif_error_success; +#else error.code = heif_error_Ok; +#endif /*HAVE_HEIF_ERROR_SUCCESS*/ + if (vips_target_write(heif->target, data, length)) { error.code = heif_error_Encoding_error; error.subcode = heif_suberror_Cannot_write_output_data; + error.message = "Cannot write output data"; } return error; diff --git a/meson.build b/meson.build index 31b4f6a1a3..ddf8f835ea 100644 --- a/meson.build +++ b/meson.build @@ -379,8 +379,8 @@ if libtiff_dep.found() endif endif -# 2.48 is the first version to not use libcroco, an unmaintained CSS parser -librsvg_dep = dependency('librsvg-2.0', version: '>=2.48.0', required: get_option('rsvg')) +# 2.40.3 so we get the UNLIMITED open flag +librsvg_dep = dependency('librsvg-2.0', version: '>=2.40.3', required: get_option('rsvg')) cairo_dep = dependency('cairo', version: '>=1.2', required: get_option('rsvg')) librsvg_found = librsvg_dep.found() and cairo_dep.found() if librsvg_found @@ -505,6 +505,10 @@ if libheif_dep.found() if libheif_dep.version().version_compare('>=1.13.0') cfg_var.set('HAVE_HEIF_INIT', '1') endif + # heif_error_success added in 1.17.0 + if libheif_dep.version().version_compare('>=1.17.0') + cfg_var.set('HAVE_HEIF_ERROR_SUCCESS', '1') + endif endif libjxl_dep = dependency('libjxl', version: '>=0.6', required: get_option('jpeg-xl'))