Crates.io | avis-imgv |
lib.rs | avis-imgv |
version | 0.2.0 |
source | src |
created_at | 2024-01-19 10:40:24.559853 |
updated_at | 2024-09-03 06:57:56.606071 |
description | Image viewer based on egui. Makes use of modern RAM amounts by loading images ahead of time for very fast responsiveness. Minimal UI with heavy use of shortcuts. |
homepage | https://github.com/hats-np/avis-imgv |
repository | https://github.com/hats-np/avis-imgv |
max_upload_size | |
id | 1105175 |
size | 316,278 |
avis-imgv is a fast, configurable and color managed image viewer built with Rust and egui. My goal was for it to be fast and to be able to adapt to any kind of hardware power through user configuration.
As of now it's only been tested in Linux, but I don't see why it wouldn't work in Windows/macOS. Configuration and cache
directories are obtained through the directories
crate which is platform-agnostic.
With rust installed simply run:
cargo build --release
Take a look at the install.sh
script. Works in most systems but might need to be adapted. It's still in a rudimentary
state and untested in most systems. Linux only for now.
Color management is done through qcms.
As of now avis-imgv is shipped with three(sRGB, Adobe RGB and Display P3) profiles. A profile is chosen based on the
exiftool tag "Profile Description" through a contains
function. This is pretty lax as we can match more specific
profiles like RT_sRGB
with srgb. Open to suggestions on this behaviour. If no profile is matched an extraction will be
attempted, although it isn't optimal for maximum performance. For this reason it is suggested opening a PR with
additional profiles.
Output Profile is sRGB by default and only supports built in profiles. If you need extra profiles either open a PR or
edit icc.rs
and add whichever ones you need for your local builds. It can be configured in config.json
.
sRGB and Adobe RGB(ClayRGB) were taken from elles_icc_profiles.
Supported image formats can be found here and here.
Default feature flag for the image
crate is used by default.
avis-imgv supports adding user actions, both with a shortcut or a context menu when right-clicking on an image. User actions are simple commands which will be spawned and take in parameters.
As of now three parameters are supported:
It is recommended to use simple commands. If you need more complex behaviour, you can use a script and pass the path as a param.
After successfully executing a user action, we can choose to automatically run a function by specifying a callback. For this just add an entry under either a context menu or a user action. An example is provided under the example config.
Configuration file should be: ~/.config/avis-imgv/config.json
. An example is provided under examples/config.json.
Keys | Values | Default |
---|---|---|
limit_cached | Maximum number of cached files metadata | 100000 |
output_icc_profile | Output icc profile | srgb |
text_scaling | Text Scaling | 1.25 |
Keys | Values | Default |
---|---|---|
loaded_images | Number of loaded images in each direction. Adjust based on how much RAM you want to use. Having more preloaded images increases application speed, to a certain point, when scrolling. | 5 |
should_wait | Should wait for image to finish loading before advancing to it | true |
metadata_tags | Metadata visible in the Image Information side pannel(when opened) | Date/Time Original, Created Date, Camera Model Name, Lens Model, Focal Length, Aperture Value, Exposure Time, ISO, Image Size, Color Space, Directory |
frame_size_relative_to_image | White frame size relative to smallest image side | 0.2 |
scroll_navigation | Should scroll be used for navigation | true |
name_format | Format for file name in bottom bar. Uses $(#exif_tag#) expressions. If exif tag is not found the entire expression will be ignored. Ex: $(#File Name#)$( • ƒ#Aperture#)$( • #Shutter Speed#)$( • #ISO# ISO) -> DSCF6114.JPG • ƒ5.6 • 1/500 • 200 ISO |
Keys | Values | Default |
---|---|---|
images_per_row | How many images should be displayed per row | 3 |
preloaded_rows | How many off-screen rows in each direction should be loaded and remain in memory | 2 |
simultaneous_load | How many images should be allowed to load at the same time | 8 (Adjust according to core count or how much you want to work your PC) |
margin_size | Margin size between images | 10 |
Shortcuts can be configured in the settings. Check examples/config.json for an example and keys.txt for valid keys and modifiers.
Key | Action |
---|---|
Backspace | Toggle between Single and Multi Gallery |
Q | Exit |
F1 | Toggles the menu |
Ctrl + L | Shows navigation bar |
T | Show Directory Tree |
Ctrl + F | Flatten (read files from all sub dirs) |
Ctrl + W | Watch a directory for file changes (create, update) |
Key | Action |
---|---|
F | Fit image to screen |
G | Toggle: White frame around the image |
I | Toggle: Display side tab with image metadata |
Spacebar | Zoom |
Ctrl+Scroll | Zoom image |
Scroll | Next or Previous |
Arrow Keys | Next or Previous |
Alt + 1 | Set Magnification at 100% |
H | Fit Horizontal |
V | Fit Vertical |
M | Maximize (Center image) |
Ctrl+M | Toggle: Maximize automatically when scrolling |
Key | Action |
---|---|
Spacebar | Scroll down |
Double Click | Open Single gallery on selected image |
Ctrl+Scroll | Increase/Decrease nr of images per row |
+ | Increase nr of images per row |
- | Decrease nr of images per row |