A simple, fast, minimalist image viewer built with C and the raylib library.
- View individual images or all images in a directory.
- Pan, zoom, rotate, and flip images.
- Toggle between anti-aliasing (bilinear) and nearest-neighbor (point) scaling.
- Display basic image information.
Provide a path to an image file or a directory as a command-line argument.
./iv path/to/your/image.pngor
./iv path/to/your/directory/| Key | Action |
|---|---|
Right Arrow |
Next image in directory |
Left Arrow |
Previous image in directory |
Mouse Wheel |
Zoom in/out at cursor |
Ctrl + + / Ctrl + - |
Zoom in/out at center |
Mouse Left (drag) |
Pan image |
W, A, S, D |
Pan image |
Q, E |
Rotate image |
R |
Reset rotation |
H |
Flip horizontally |
V |
Flip vertically |
F |
Reset all view changes |
I |
Toggle info display |
Ctrl + A |
Toggle anti-aliasing |
Esc |
Quit |
You need a C compiler (like gcc) and raylib installed.
On a Debian-based distro, you can install raylib with:
sudo apt-get install libraylib-devOn an Arch-based distro, you can install raylib with:
sudo pacman -S raylibThen, compile the program using the following command:
gcc main.c -o iv -lraylib -lGL -lm -lpthread -ldl -lrt -lX11
# --- If you are on wayland and not X11,
# you can simply run the build command
# without the -lX11 flag