Commit Graph

13 Commits

Author SHA1 Message Date
Přemysl Eric Janouch 200485246b
Process some GFileMonitor events
So far, it's rather crude.
2023-05-31 18:39:14 +02:00
Přemysl Eric Janouch 05ac3a0651
Check filesize when retrieving thumbnails
In particular, this handles screenshots from Rigol oscilloscopes,
which reuse the same name series with the same file modification time.
2023-04-14 05:24:57 +02:00
Přemysl Eric Janouch 796b05c9a5
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.
2023-03-15 05:52:32 +01:00
Přemysl Eric Janouch 4e11970a7e
Do produce thumbnails of thumbnails, but in memory 2022-08-09 13:22:11 +02:00
Přemysl Eric Janouch 701846ab39
Support opening collections of files
Implement a process-local VFS to enable grouping together arbitrary
URIs passed via program arguments, DnD, or the file open dialog.

This VFS contains FivCollectionFile objects, which act as "simple"
proxies over arbitrary GFiles.  Their true URIs may be retrieved
through the "standard::target-uri" attribute, in a similar way to
GVfs's "recent" and "trash" backends.

(The main reason we proxy rather than just hackishly return foreign
GFiles from the VFS is that loading them would switch the current
directory, and break iteration as a result.

We could also keep the collection outside of GVfs, but that would
result in considerable special-casing, and the author wouldn't gain
intimate knowledge of GIO.)

There is no perceived need to keep old collections when opening
new ones, so we simply change and reload the contents when needed.

Similarly, there is no intention to make the VFS writeable.

The process-locality of this and other URI schemes has proven to be
rather annoying when passing files to other applications,
however most of the resulting complexity appears to be essential
rather than accidental.

Note that the GTK+ file chooser widget is retarded, and doesn't
recognize URIs that lack the authority part in the location bar.
2022-08-08 18:06:50 +02:00
Přemysl Eric Janouch 84f8c9436f
Downscale embedded thumbnails within minions
Otherwise the UI would become unresponsive during loading.
2022-06-08 02:51:55 +02:00
Přemysl Eric Janouch 8dfbd0dee2
Add a command line option to extract thumbnails
Only use LibRaw for now, which probably has the most impact
using the least amount of effort.
2022-06-08 02:51:54 +02:00
Přemysl Eric Janouch 930744e165
Add flags to the serialization protocol
It still needs no versioning, as it's not really used by anyone.

An alternative method of passing a "low-quality" flag would be
perusing fiv_thumbnail_key_lq from fiv-thumbnail.c, which would
create a circular dependency, unless fiv_io_{de,}serialize*()
were moved to fiv-thumbnail.c.
2022-06-08 02:51:54 +02:00
Přemysl Eric Janouch e2adac72cc
Use the model's mtime for validating thumbnails
Saves a syscall, generalizes fiv_thumbnail_lookup(),
wastes a tiny bit of memory per entry.
2022-06-04 16:37:25 +02:00
Přemysl Eric Janouch 04ec292caf
Make thumbnailers pass back raw images 2022-02-20 21:14:33 +01:00
Přemysl Eric Janouch a28fbf25bc
Implement wide thumbnail cache invalidation 2022-02-20 15:44:42 +01:00
Přemysl Eric Janouch 6a878fd3c4
Bump more copyright years 2022-01-07 09:53:58 +01:00
Přemysl Eric Janouch bf47782f0a
Move thumbnails into their own source file
And clean up identifiers.
2021-12-28 20:18:25 +01:00