write good, short description for this for github (like 1-8 sentences):
Minimal Image Viewer: A High-Performance, Secure, and Modular Image Viewer for Windows
Minimal Image Viewer is an open-source, C++-based image viewing application engineered for Windows, prioritizing performance, operational security (OpSec), and minimalism. With a compiled size of approximately 100 KB, it delivers a lightweight, telemetry-free solution for photographers, developers, and security-conscious users. Leveraging native Windows APIs and the Windows Imaging Component (WIC), it ensures robust functionality with an emphasis on privacy, efficiency, and auditability under the MIT license. The application adheres to a modular design, focusing exclusively on core image viewing and manipulation to integrate seamlessly into specialized workflows.
Key Features
Technical Highlights
Minimal Image Viewer is architected for high performance, minimal resource usage, and robust security, leveraging native Windows technologies.
Core Implementation
Performance Optimizations
-
Minimal Footprint:
- Compiles to a ~100 KB executable with
/O2 optimization, requiring <10 MB runtime memory for most images.
- No external dependencies beyond standard Windows libraries (
user32.lib, gdi32.lib, windowscodecs.lib, etc.).
-
Efficient Rendering:
- Double buffering eliminates screen tearing and minimizes CPU usage (<5% on modern hardware).
- World transforms leverage GPU acceleration for rotations, avoiding costly pixel reprocessing.
-
Resource Management:
- Strictly manages WIC (
Release) and GDI (DeleteObject) resources to prevent memory leaks, verified with tools like Application Verifier.
- Closes file handles (
CloseHandle) immediately after use to ensure system resource availability.
Build Process
- Tools: Microsoft C++ compiler (
cl.exe) and Resource Compiler (rc.exe), or MinGW-w64 (g++, windres).
- Resources: Links
minimallogo.ico (ID 100) via resource.rc for custom branding.
- Build Commands:
- Visual Studio:
rc.exe /fo resource.res resource.rc
cl.exe /O2 /EHsc /Fe:MinimalImageViewer.exe MinimalImageViewer.cpp resource.res /link /SUBSYSTEM:WINDOWS user32.lib gdi32.lib comdlg32.lib shlwapi.lib windowscodecs.lib ole32.lib shell32.lib propsys.lib oleaut32.lib
- MinGW-w64:
windres -o resource.o resource.rc
g++ -o MinimalImageViewer.exe MinimalImageViewer.cpp resource.o -mwindows -luser32 -lgdi32 -lcomdlg32 -lshlwapi -lwindowscodecs -lole32 -lshell32 -lpropsys -loleaut32
Security and Privacy
Minimal Image Viewer is designed for OpSec-sensitive environments, prioritizing a minimal attack surface and zero telemetry.
Why Modular?
Minimal Image Viewer adheres to the Unix philosophy of “do one thing and do it well,” offering distinct advantages:
- Efficiency: Minimal resource usage (<10 MB RAM, ~100 KB disk) enables integration into resource-constrained workflows, outperforming bloated alternatives like Windows Photos (~100 MB RAM).
- Security: Focused functionality reduces attack vectors compared to feature-heavy tools with cloud integration or telemetry (e.g., Windows Photos, Adobe Bridge).
- Flexibility: Complements specialized tools (e.g., ExifTool, RawTherapee) for workflows in photography, digital forensics, or development.
- Maintainability: Small codebase simplifies updates, security patches, and community contributions.
Comparison with Alternatives
| Feature | Minimal Image Viewer | Windows Photos | IrfanView | XnView |
|---|
| Executable Size | ~100 KB | ~50 MB | ~3 MB | ~5 MB |
| Dependencies | None (Windows APIs) | UWP Framework | Optional Plugins | Optional Plugins |
| Telemetry | None | Yes | Optional | Optional |
| Offline Operation | Yes | Partial | Yes | Yes |
| Image Format Support | WIC-dependent (all formats) | Codec-dependent | Plugin-dependent | Plugin-dependent |
| Open-Source | Yes (MIT) | No | No | No |
| Full-Screen Toggle | Yes | Yes | Yes | Yes |
| Footprint (RAM) | <10 MB | ~100 MB | ~20 MB | ~30 MB |
Minimal Image Viewer excels in size, privacy, and format support, leveraging WIC’s extensibility for unparalleled compatibility.
System Requirements
- OS: Windows 10 or later (64-bit recommended for optimal WIC codec support).
- Dependencies: None (uses standard Windows libraries:
user32, gdi32, windowscodecs, etc.).
- Image Format Support: Supports all WIC-compatible formats; advanced formats (e.g., WebP, HEIF, AVIF) require installed codecs (e.g., Microsoft Store extensions).
- Disk Space: ~100 KB for executable, plus
minimallogo.ico and resource.rc.
- Memory: <10 MB runtime for typical images, scaling with image resolution.
Installation and Usage
-
Clone or Download:
- Clone the repository or download
MinimalImageViewer.cpp, resource.rc, and minimallogo.ico.
-
Build:
- Visual Studio:
- Open Developer Command Prompt for Visual Studio.
- Run the build commands listed above.
- MinGW-w64:
- Ensure
windres and g++ are in PATH.
- Run the MinGW build commands listed above.
-
Run:
- Execute
MinimalImageViewer.exe in a directory with images or pass an image path as a command-line argument (e.g., MinimalImageViewer.exe image.jpg).
- No installation or admin rights required.
-
Controls:
- Open: Ctrl+O or right-click → "Open Image" (supports all WIC-compatible formats).
- Navigate: Left/Right arrows or right-click → "Next/Previous Image."
- Zoom: Ctrl++/-, mouse wheel, or right-click → "Zoom In/Out"; Ctrl+0 or double-click to fit.
- Rotate: Up/Down arrows or right-click → "Rotate Clockwise/Counterclockwise."
- Save: Ctrl+S or right-click → "Save Image" (preserves original format).
- Delete: Delete or right-click → "Delete Image" (to Recycle Bin).
- Full-Screen: F11 or right-click → "Full Screen."
- Move/Resize: Drag window or edges (non-full-screen).
- Exit: Esc or right-click → "Exit."
Contributing
Contributions are welcome under the MIT license. To contribute:
- Fork the repository.
- Create a feature branch (
git checkout -b feature/YourFeature).
- Commit changes (
git commit -m "Add YourFeature").
- Push to the branch (
git push origin feature/YourFeature).
- Open a pull request, ensuring alignment with the project’s minimalist and security-focused philosophy.
Include unit tests (e.g., for new WIC format handling) and update documentation for new features.
License
MIT License. See LICENSE for details.
Acknowledgments
- Inspired by the Unix philosophy of simplicity and modularity.
- Built on the robust Windows API and WIC for native performance and broad format support.
- Dedicated to developers and professionals prioritizing efficiency, security, and privacy.
Contact
File issues or suggestions on the GitHub repository. For direct inquiries, contact the maintainer via GitHub.
Minimal Image Viewer: A fast, secure, and extensible image viewer for privacy-conscious professionals.