Files

28 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

2026-11-21 00:55:39 +01:00
# Media Viewer
2026-11-21 00:55:39 +01:00
A desktop image viewer for Windows, written in Rust. It opens a native window using eframe/egui; no browser or WebView is involved.
2026-11-21 00:55:39 +01:00
## Run
2026-11-21 00:55:39 +01:00
```powershell
cargo run
2026-11-21 00:55:39 +01:00
cargo run -- "C:\path\to\photo.jpg"
cargo run -- "C:\path\to\folder"
```
2026-11-21 00:55:39 +01:00
To create an executable, run `cargo build --release`. The result is `target\release\media-viewer.exe`.
2026-11-21 00:55:39 +01:00
## Use
2026-11-21 00:55:39 +01:00
- **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.
2026-11-21 00:55:39 +01:00
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.
2026-11-21 00:55:39 +01:00
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`.