Files
2026-11-21 00:55:39 +01:00

29 lines
1.5 KiB
Markdown

# Media Viewer
A desktop image viewer for Windows, written in Rust. It opens a native window using eframe/egui; no browser or WebView is involved.
## Run
```powershell
cargo run
cargo run -- "C:\path\to\photo.jpg"
cargo run -- "C:\path\to\folder"
```
To create an executable, run `cargo build --release`. The result is `target\release\media-viewer.exe`.
## Use
- **Open image** or **Ctrl+O** selects an image. The viewer also finds other supported images in the same folder for navigation.
- **Open folder** loads the images in a folder, sorted by filename.
- Drag and drop an image or folder into the window.
- **Left/Right** or the toolbar buttons move between images. Navigation wraps at either end.
- **+ / -** or the toolbar buttons change zoom; **Ctrl+mouse wheel** also zooms. **0** or **Fit** fits the image in the window.
- **F11** toggles fullscreen; **Esc** exits it.
- **Play slides** advances through the folder every three seconds; **Pause slides** stops it.
- Animated GIFs play at their embedded frame timing. Use **Pause GIF** or **Play GIF** to control them independently of the folder slideshow.
Supported image types: JPEG, PNG, BMP, animated GIF, TIFF, and WebP. Images are prefiltered when reduced to fit the window, which avoids harsh edges and aliasing. The status bar shows the filename, position, dimensions, and file size. Decoding errors appear in the window.
The `test_images` folder contains working examples of every supported format, including a two-frame animated GIF. Regenerate them with `cargo run --example generate_samples`.