From 796b05c9a5f04aba87e26c5a8384d84edee20b77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Wed, 15 Mar 2023 03:31:30 +0100 Subject: Integrate online reverse image search This makes use of our image processing capabilities in order to turn arbitrary image files into normalized thumbnails, upload them to a temporary host, and pass the resulting URI to a search provider. In future, fiv should ideally run the upload itself, so that its status and any errors are obvious to the user, as well as to get rid of the script's dependency on jq. --- fiv-thumbnail.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'fiv-thumbnail.h') diff --git a/fiv-thumbnail.h b/fiv-thumbnail.h index 7f3360a..de5be51 100644 --- a/fiv-thumbnail.h +++ b/fiv-thumbnail.h @@ -1,7 +1,7 @@ // // fiv-thumbnail.h: thumbnail management // -// Copyright (c) 2021 - 2022, Přemysl Eric Janouch +// Copyright (c) 2021 - 2023, Přemysl Eric Janouch // // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted. @@ -62,6 +62,10 @@ cairo_surface_t *fiv_thumbnail_extract( cairo_surface_t *fiv_thumbnail_produce( GFile *target, FivThumbnailSize max_size, GError **error); +/// Like fiv_thumbnail_produce(), but skips the cache. +cairo_surface_t *fiv_thumbnail_produce_for_search( + GFile *target, FivThumbnailSize max_size, GError **error); + /// Retrieves a thumbnail of the most appropriate quality and resolution /// for the target file. cairo_surface_t *fiv_thumbnail_lookup( -- cgit v1.2.3