Skip to content

Commit

Permalink
Merge branch '8.15' of github.com:libvips/libvips into 8.15
Browse files Browse the repository at this point in the history
  • Loading branch information
jcupitt committed Oct 21, 2023
2 parents c9396bb + dda2df2 commit 0c1e687
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
17 changes: 12 additions & 5 deletions libvips/foreign/exif.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)) {
Expand All @@ -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 {
Expand Down
6 changes: 6 additions & 0 deletions libvips/foreign/heifsave.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 6 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'))
Expand Down

0 comments on commit 0c1e687

Please sign in to comment.