A lightweight image viewer built with V and gg, supporting multiple formats, zoom, slideshow, and keyboard shortcuts.
Requires V. Use Git Bash on Windows.
# Verify formatting/vet/tests, then build
./build.sh
# Build to a different directory
OUT_DIR=./out ./build.shbuild.sh defaults to OUT_DIR=D:/public. That directory is already on
PATH, so the resulting picview.exe can be run from anywhere without
touching PATH.
picview [OPTIONS] [DIR|FILE]
DIR|FILE is a directory containing images, or a single image file to start
from. Defaults to the current directory.
# Pass the image directory as the first argument
picview images
# Or pass a single image file to browse its directory, starting at that file
picview images/sample.jpeg
# Or run in the current directory
picview
# Include subdirectories
picview -r images
# Print usage and exit (see Known limitations)
picview -h
# Optional fallback for compatibility
env PIC_DIR="images" picviewWhile developing, run straight from source instead:
v run . images- .jpg, .jpeg, .png, .gif, .bmp, .webp
Left/A- Previous imageRight/D- Next imageUp/Down- Pan view
+/=- Zoom in-/_- Zoom out0- Fit to window1- 100% sizeR- Refit to windowDrag- Move image with mouse
S- Toggle slideshow[/]- Decrease/increase slideshow interval (seconds)
F- Toggle fullscreen (shows status)H- Show/hide help barEsc- Exit
picview -hexits without opening a window and prints nothing, whether run directly or with stdout redirected. The binary is linked with the Windows GUI subsystem (because it importsgg), so the usage text written byusage()has no console to reach. Use the in-window help bar (H) to see the key bindings instead.
- Images are sorted naturally by filename (e.g., img2.jpg before img10.jpg)
- Neighboring images are decoded in a background thread; recently viewed images are kept in a small GPU texture cache
- The image cannot be dragged fully out of the window; press
Ror0to refit anyway - Shows: filename, resolution, index, zoom scale, fullscreen & slideshow status
- The first command-line argument points to the image directory; the bundled samples live in
images/ - Mouse wheel also zooms the image, matching the
+/-shortcuts