You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As briefly mentioned in #321, it would be useful to to be able to display some information about the image file in the metadata widget, which are not part of exif (or only part for some formats). Concretely, it would be useful to be able to get the imageformat, X and Y dimension in pixels and the file size.
To integrate this information into the metadata widget, probably the easiest option would be to add some special keys, which are e.g. prefixed by Vimiv.<key>. In imutils.exif.ExifHandler we would have to filter these options before submitting the keys to exiv2 and handle them separately.
The advantage of this approach is that these additional information is well integrated into the metadata widget, meaning that no extra command or something is required to display them.
Open questions:
What keys would be useful to have? I have so far come up with:
Should imutils.exif.ExifHandler be renamed to imutils.metadata.MetadataHandler (or something similar) since the handler deals with exif, iptc and general metadata.
What do you think @karlch? Do you have a better idea for an implementation?
The text was updated successfully, but these errors were encountered:
I like the idea of having additional "internal" keys, but I am not sure I like mixing this with the ExifHandler directly. The code is already quite involved there. I am fine with renaming the handler though, as you say also iptc is supported.
Personally, I would prefer to have all of this split into different chunks, maybe something like:
The exif / metadata handler that we have currently to deal with regular keys
Some function / class / module to deal with vimiv keys
Some class that combines the two and delegates the work accordingly
Careful thinking would be especially important if the vimiv keys require accessing the current pixmap to retrieve the pixel size as I would really like to keep exif and qt pixmaps as separate as possible. The more I think about this the more afraid I am of possible code coupling, but I may be overthinking and should probably wait for some actual coding 😆
What do you think? Do you want to take a shot at this?
As briefly mentioned in #321, it would be useful to to be able to display some information about the image file in the metadata widget, which are not part of exif (or only part for some formats). Concretely, it would be useful to be able to get the imageformat, X and Y dimension in pixels and the file size.
To integrate this information into the metadata widget, probably the easiest option would be to add some special keys, which are e.g. prefixed by
Vimiv.<key>
. Inimutils.exif.ExifHandler
we would have to filter these options before submitting the keys to exiv2 and handle them separately.The advantage of this approach is that these additional information is well integrated into the metadata widget, meaning that no extra command or something is required to display them.
Open questions:
Vimiv.ImageFormat
: Image extension (JPEG, CR2 etc.)Vimiv.XDimension
: Length of image in pixelsVimiv.YDimension
: Height of image in pixelsVimiv.FileSize
: The file size in MBimutils.exif.ExifHandler
be renamed toimutils.metadata.MetadataHandler
(or something similar) since the handler deals with exif, iptc and general metadata.What do you think @karlch? Do you have a better idea for an implementation?
The text was updated successfully, but these errors were encountered: