aboutsummaryrefslogtreecommitdiff
path: root/fiv-thumbnail.c
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2023-06-23 14:37:12 +0200
committerPřemysl Eric Janouch <p@janouch.name>2023-06-24 13:56:36 +0200
commitadd96b37a65fa40e87fd1f3eb9bead896fc2ae8f (patch)
tree78a7bfde8dbd776c1cb6002f33ddbd0ab1313648 /fiv-thumbnail.c
parentc2e8b65d0f77e7b93c4676df74bb0cf706e5665b (diff)
downloadfiv-add96b37a65fa40e87fd1f3eb9bead896fc2ae8f.tar.gz
fiv-add96b37a65fa40e87fd1f3eb9bead896fc2ae8f.tar.xz
fiv-add96b37a65fa40e87fd1f3eb9bead896fc2ae8f.zip
Stop abusing Cairo user data, part 1
This commit temporarily breaks multi-page images and animations.
Diffstat (limited to 'fiv-thumbnail.c')
-rw-r--r--fiv-thumbnail.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fiv-thumbnail.c b/fiv-thumbnail.c
index 9d58140..b1f0554 100644
--- a/fiv-thumbnail.c
+++ b/fiv-thumbnail.c
@@ -137,8 +137,8 @@ render(GFile *target, GBytes *data, gboolean *color_managed, GError **error)
.warnings = g_ptr_array_new_with_free_func(g_free),
};
- cairo_surface_t *surface = fiv_io_open_from_data(
- g_bytes_get_data(data, NULL), g_bytes_get_size(data), &ctx, error);
+ cairo_surface_t *surface = fiv_io_image_to_surface(fiv_io_open_from_data(
+ g_bytes_get_data(data, NULL), g_bytes_get_size(data), &ctx, error));
g_free((gchar *) ctx.uri);
g_ptr_array_free(ctx.warnings, TRUE);
if ((*color_managed = !!ctx.screen_profile))
@@ -793,8 +793,8 @@ read_wide_thumbnail(const char *path, const Stat *st, GError **error)
if (!thumbnail_uri)
return NULL;
- cairo_surface_t *surface =
- fiv_io_open(&(FivIoOpenContext){.uri = thumbnail_uri}, error);
+ cairo_surface_t *surface = fiv_io_image_to_surface(
+ fiv_io_open(&(FivIoOpenContext){.uri = thumbnail_uri}, error));
g_free(thumbnail_uri);
if (!surface)
return NULL;