pqiv
pqiv copied to clipboard
Rotation with metadata
It would be great if exif metadata was used to flip and rotate images where it is possible.
Also, what do you think about option to show metadata?
It already is, at least for all images handled through the GdkPixbuf backend.
The idea for showing stuff like displaying metadata is to use the > command modifier, e.g.
pqiv -1 ">exif"
then just press 1 to display exif information, provided you have the exif tool installed.
It already is, at least for all images handled through the GdkPixbuf backend.
I meant writing exif metadata, not just handling it, that way pqiv will be able to save rotation and flip options without meddling with images themselves. I tried to make something like this with keybindings, but in pretty dumb way:
rr { command(exiv2 -M'set Exif.Image.Orientation 6' "$PWD/$\(basename $1\)") }
rl { command(exiv2 -M'set Exif.Image.Orientation 8' "$PWD/$\(basename $1\)") }
ru { command(exiv2 -M'set Exif.Image.Orientation 3' "$PWD/$\(basename $1\)") }
rd { command(exiv2 -M'del Exif.Image.Orientation' "$PWD/$\(basename $1\)") }
And with flip options there will be too much keybindings.
then just press 1 to display exif information, provided you have the exif tool installed.
I was thinking about something like jump_dialog, but with output from external command. But alright, it doesn't matter much.
I meant writing exif metadata, not just handling it, that way pqiv will be able to save rotation and flip options without meddling with images themselves.
I'm not a fan of adding such functionality to pqiv itself. Adding functionality to enable users to do something like this by themselves is a different story though. So if you have ideas for how the command system could be improved to make this easier (or possible in the first place) I'm all ears.
(In this case it sounds somewhat as if we're approaching the situation where the logical next step would be embedding a Lua interpreter into pqiv :>)