karlch/vimiv-qt

Extend information displayed by :metadata

Closed this issue · 5 comments

Currently the exif information shown by the :metadata command is rather limited. Mainly because I am not very experienced with exif and don't know what information is useful to camera-lovers and how it should be formatted. Therefore this is a great place for anyone with more knowledge to step in.

The information is retrieved in the ExifInformation dictionary class in imutils.exif. It contains a dictionary with all exif information retrieved by piexif. The ExifInformation itself is filled with keys corresponding to the displayed name of the information and their respective values. Example:

{"Make": "Canon"}

All of the information loading happens in the _load_exif method which gets called upon construction. The MetadataWidget in gui.metadata_widget knows how to process and display the information in this dictionary.

To extend the information displayed only more information must be added to the dictionary, making sure to catch any KeyError exceptions in case the exif data is not available for the current image.

eorus commented

I would like to ask if there is any update on this one. I want to see the image size info or a meta deta display. Is there a way to get this information in the current build?

Thanks for your interest. There are currently two options:

  • The :metadata command, also bound to i in image mode which shows some basic EXIF information. Adding the image size here should not be difficult if this is wished.
  • The image-size status module which would display the image size in the statusbar. To use it, add {image-size} anywhere in one of the image mode status configurations in the vimiv.conf, e.g.:
[STATUSBAR]
...
left_image = {index}/{total} {basename} [{zoomlevel}] {image-size}

If you are interested in any specific other metadata, just let me know. If you like, you could also extend the code imutils.exif, especially the loading of the dictionary around ExifInformation._load_exif.

Note that the :metadata command requires piexif to be installed as it used this module to load the data.

Hope this helps!

eorus commented

Adding {image-size} simply solves this issue. Metadata can be used for more information. Thanks for the quick support and for Vimiv.

This is pure speed and navigation image viewer, probably the fastest I have used so far for browsing images.

Thanks for these warm words, just let me know if you need help with anything else or have any further suggestions.

As the information is now fully configurable thanks to #212, this is much closer to a solution.

Closing this in favor of #213 and #214. In the process of implementing #213 @jeanggi90 and I can hopefully come up with a nice set of sane defaults.