Compare commits

..

No commits in common. "0318424540d3cfd2fce15c6999066beb4d80c44d" and "1577961aa2d8d8e37df82b2179e8b843f03cbf7d" have entirely different histories.

2 changed files with 6 additions and 20 deletions

View File

@ -3039,8 +3039,7 @@ open_libtiff(
// We inform about unsupported directories, but do not fail on them. // We inform about unsupported directories, but do not fail on them.
GError *err = NULL; GError *err = NULL;
if (!try_append_page( if (!try_append_page(
load_libtiff_directory(tiff, &err), &result, &result_tail) && load_libtiff_directory(tiff, &err), &result, &result_tail)) {
err) {
add_warning(ctx, "%s", err->message); add_warning(ctx, "%s", err->message);
g_error_free(err); g_error_free(err);
} }
@ -3108,20 +3107,10 @@ open_gdkpixbuf(
gdk_pixbuf_get_bits_per_sample(pixbuf) == 8; gdk_pixbuf_get_bits_per_sample(pixbuf) == 8;
cairo_surface_t *surface = NULL; cairo_surface_t *surface = NULL;
if (custom_argb32) { if (custom_argb32)
surface = load_gdkpixbuf_argb32_unpremultiplied(pixbuf); surface = load_gdkpixbuf_argb32_unpremultiplied(pixbuf);
} else { else
// Don't depend on GDK being initialized, to speed up thumbnailing surface = gdk_cairo_surface_create_from_pixbuf(pixbuf, 1, NULL);
// (calling gdk_cairo_surface_create_from_pixbuf() would).
cairo_surface_t *dummy =
cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 1, 1);
cairo_t *cr = cairo_create(dummy);
cairo_surface_destroy(dummy);
gdk_cairo_set_source_pixbuf(cr, pixbuf, 0, 0);
(void) cairo_pattern_get_surface(cairo_get_source(cr), &surface);
cairo_surface_reference(surface);
cairo_destroy(cr);
}
cairo_status_t surface_status = cairo_surface_status(surface); cairo_status_t surface_status = cairo_surface_status(surface);
if (surface_status != CAIRO_STATUS_SUCCESS) { if (surface_status != CAIRO_STATUS_SUCCESS) {
@ -3324,8 +3313,6 @@ fiv_io_open_from_data(
GError *err = NULL; GError *err = NULL;
if ((surface = open_gdkpixbuf(data, len, ctx, &err))) { if ((surface = open_gdkpixbuf(data, len, ctx, &err))) {
g_clear_error(error); g_clear_error(error);
} else if (!err) {
// Contrary to documentation, this is a possible outcome (libheif).
} else if (err->code == GDK_PIXBUF_ERROR_UNKNOWN_TYPE) { } else if (err->code == GDK_PIXBUF_ERROR_UNKNOWN_TYPE) {
g_error_free(err); g_error_free(err);
} else { } else {

View File

@ -332,12 +332,11 @@ extract_libraw_unpack(libraw_data_t *iprc, int *flip, GError **error)
sorted[i]->tformat == LIBRAW_INTERNAL_THUMBNAIL_KODAK_THUMB) sorted[i]->tformat == LIBRAW_INTERNAL_THUMBNAIL_KODAK_THUMB)
i++; i++;
bool found = i != count; if (i < count)
if (found)
i = sorted[i] - iprc->thumbs_list.thumblist; i = sorted[i] - iprc->thumbs_list.thumblist;
g_free(sorted); g_free(sorted);
if (!found) { if (i == count) {
set_error(error, "no suitable thumbnails found"); set_error(error, "no suitable thumbnails found");
return FALSE; return FALSE;
} }