Create thumbnails of spm data files
gwyddion-thumbnailer {--version | --help} gwyddion-thumbnailer [OPTION...] {MODE} [ARGUMENT...]
Gwyddion-thumbnailer creates thumbnails of SPM (Scanning Probe Microscope) image files. Depending on the mode of operation, described below, the thumbnails are written to conform to various desktop standards so that they can be displayed in nautilus(1), thunar(1) and similar file managers.
Gwyddion-thumbnailer loads and renders files using gwyddion(1), libraries and modules, therefore, it can create thumbnails of all file formats supported by your Gwyddion installation. This also means it inherits Gwyddion settings, e.g. the default false color gradient, and that it is influenced by the same environment variables as Gwyddion.
--help
Prints a brief help and terminates.
--version
Prints version information and terminates.
--update
Writes the thumbnail only if it does not exist yet or does not seem to be up-to-date. By default, gwyddion-thumbnailer overwrites existing thumbnails with fresh ones even if they seem up to date.
Three thumbnailing modes are available: gnome2, tms and kde4; and one special mode: check. They are described below.
gwyddion-thumbnailer [OPTION...] gnome2 MAX-SIZE INPUT-FILE OUTPUT-FILE
In gnome2 mode, gwyddion-thumbnailer creates PNG thumbnails according to the Gnome thumbnailer specification. Usings the convention from this specification, it should be run
gwyddion-thumbnailer gnome2 %s %i %o
Gwyddion installs the corresponding GConf schemas and enables thumbnailers for all file types it supports by default, so usually this should Just Work and should not need to be set up manually.
The thumbnails created in gnome2 more are identical as in tms mode, including all the PNG auxiliary chunks (provided that the same MAX-SIZE as in tms mode is specified, of course).
gwyddion-thumbnailer [OPTION...] tms MAX-SIZE INPUT-FILE
In tms mode, gwyddion-thumbnailer creates PNG thumbnails according to the Thumbnail Managing Standard. Argument MAX-SIZE must be 128 or normal (both meaning 128 pixels) or 256 or large (both meaning 256 pixels).
Output file name is not given as it is prescribed by the TMS. The thumbnail is placed to the directory for normal or large thumbnails according to given MAX-SIZE.
This mode can also be useful for manual batch-creation of thumbnails. For instance, to create them for all *.afm files in directory scans and its subdirectories, you can run
find scans -type f -name \'*.afm\' -print0 \\ | xargs -0 -n 1 gwyddion-thumbnailer --update tms normal
And then go make yourself a coffee because this will take some time.
gwyddion-thumbnailer kde4 MAX-SIZE INPUT-FILE
In kde4 mode, gwyddion-thumbnailer creates PNG thumbnails that are intended to be consumed by gwythumbcreator KDE module. The thumbnail, again identical as in the other modes, is written to the standard output.
Do not use this mode from the command line. It is documented for completness, however, the protocol between gwythumbcreator and gwyddion-thumbnailer must be considered private and it can change any time.
gwyddion-thumbnailer check INPUT-FILE
The check mode does not serve for thumbnail creation. Instead, gwyddion-thumbnailer prints information about available thumbnails of INPUT-FILE and cached failures to produce a thumbnail by individual applications, as described by the TMS.
If the normal-sized thumbnail exists and is up to date, the large version does not exist and there is one cached failure from gnome-thumbnail-factory, the output can be for instance:
File: INPUT-FILE URI: file:///home/me/Pictures/naughty/broken-tip3/INPUT-FILE Normal: /home/me/.thumbnails/normal/MD5.png status: OK Large: /home/me/.thumbnails/large/MD5.png status: Thumbnail does not exist or stat() fails on it. Failed: /home/me/.thumbnails/fail/gnome-thumbnail-factory/MD5.png
URI is the canonical URI of the input file, MD5 stands for the hex representation of MD5 sum of the URI, as described by the TMS. If there are no cached failures, no Failed lines are printed.
This function can be used to check thumbnails of any kind, not necessarily created by gwyddion or gwyddion-thumbnailer. In future, it might be reported as an error if the thumbnail does not contain Gwyddion-specific information though.
Yeti
Author.