Making Amiga IFF Thumbnails Work in Linux
linuxjedi.co.uk
linuxjedi.co.uk
The datatypes library provided a simple object model that allows you to drop a system-wide library in place to handle a new format.
If you wanted to scale images for thumbnails, for example, you would simply obtain a data type object and get back decoded image data and scale it, and automatically be able to handle everything the user have picture datatypes for.
So you add basic support for a format once.
However it requires some COM wrestling, the Amiga way was definitely more developer friendly.
One of the nice things about datatypes is that the app asks for an instance of the overall type of data it cares about that matches the given file, and gets back a subclass, but anyone can implement new base types for people to subclass, or you can augment an existing class with additional functionality.
As a result there are datatypes for syntax highlighting, viewing binary files, images, sound, animations, video, viewing directory listings etc, and ,ore.
I was really surprised when I drank the koolaid and switched to windows that every app had its own set of favorite formats.
I guess we have the essence of something similar-ish with libarchive⁴, but nobody(including me) has pushed the extra mile to get file dialogs to support random compression and decompression formats.
Beyond OT: I didn't realise how much stuff was still going on at aminet, but I love love LOVE that people are still dropping new car sets for Geoff Crammond's F1GP.
¹ http://aminet.net/package/util/pack/xpk_User
² http://aminet.net/package/util/pack/xfdmaster
Exec=convert %i -thumbnail %s %o
Seeing things like that always makes me wonder how it behaves if you happen to have a file named something like '; rm -rf *' or similar; a quick online search unfortunately reveals very little documentation on how exactly that command is parsed, substituted, and executed.Part of the standard https://specifications.freedesktop.org/thumbnail-spec/thumbn...
I believe that this would be part of GnomeDesktopThumbnailFactory , probably https://gitlab.gnome.org/GNOME/gnome-desktop/-/blob/master/l...
Looks like its working by design.