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

- **Comprehensive Image Format Support**:
  - Supports a wide array of formats via WIC, including JPEG, PNG, BMP, GIF, TIFF, ICO, WebP, HEIF, AVIF, and RAW formats (e.g., .cr2, .cr3, .nef, .dng, .arw, .orf, .rw2) with appropriate codecs installed.
  - Dynamically validates files as images using WIC’s `IWICBitmapDecoder`, enabling support for any WIC-compatible format without hardcoding extensions.
  - Preserves original file formats during save operations, ensuring fidelity for formats like TIFF and GIF.

- **Intuitive Navigation**:
  - Directory-based image navigation via Left/Right arrow keys or context menu ("Next Image," "Previous Image").
  - Automatically indexes all WIC-supported images in the current directory, sorted lexicographically.

- **Flexible Viewing**:
  - Smooth zoom (0.1x–10x) via Ctrl++/-, mouse wheel, or context menu, implemented with `SetWorldTransform` for GPU-friendly scaling.
  - Fits images to window (Ctrl+0 or double-click), adjusting for rotation angles (0°, 90°, 180°, 270°).
  - Rotates images in 90° increments using `IWICBitmapFlipRotator` for efficient transformations.

- **Image Management**:
  - Saves rotated images (Ctrl+S or context menu) in their original WIC-supported format, using temporary files to ensure atomic operations.
  - Deletes images to the Recycle Bin (Delete key or context menu) with `SHFileOperationW` and `FOF_ALLOWUNDO` for recoverable deletions.
  - Opens images via `OPENFILENAMEW` with a comprehensive filter for common image formats, falling back to WIC for validation.

- **Minimalist Interface**:
  - Borderless window (`WS_POPUP`) for a distraction-free experience, with dynamic cursor feedback for resizing.
  - Displays "Right click to see hotkeys" when no image is loaded, using GDI text rendering.
  - Custom icon (`minimallogo.ico`, ID 100) for taskbar and Alt+Tab branding, linked via `resource.res`.

- **Window Control**:
  - Supports window dragging (non-full-screen) and edge-based resizing with a 10-pixel hit area (`WM_NCHITTEST`).
  - Toggles full-screen mode (F11 or context menu) with automatic image fitting, preserving window state.
  - Exits via Esc or context menu, ensuring clean resource deallocation.

- **Single-Instance Enforcement**:
  - Uses `FindWindowW` to prevent multiple instances, forwarding command-line arguments to the existing instance via `WM_COPYDATA`.

## Technical Highlights

Minimal Image Viewer is architected for high performance, minimal resource usage, and robust security, leveraging native Windows technologies.

### Core Implementation

- **Windows API**:
  - Creates a borderless window with `CreateWindowW` and `WS_POPUP`, minimizing UI overhead.
  - Implements double buffering in `WM_PAINT` using `CreateCompatibleDC` and `BitBlt` for flicker-free rendering at 60+ FPS.
  - Handles input via `WM_KEYDOWN`, `WM_MOUSEWHEEL`, `WM_LBUTTONDBLCLK`, and `WM_RBUTTONDOWN`, with a context menu (`CreatePopupMenu`) for all operations.
  - Supports edge-based resizing (`WM_NCHITTEST`, `WM_MOUSEMOVE`) with dynamic cursor updates, disabled in full-screen mode for seamless viewing.

- **Windows Imaging Component (WIC)**:
  - Decodes images with `IWICBitmapDecoder` and `IWICBitmapFrameDecode`, using `nullptr` GUID to support all WIC-compatible formats dynamically.
  - Converts to `GUID_WICPixelFormat32bppPBGRA` via `IWICFormatConverter` for GDI compatibility, ensuring consistent rendering across formats.
  - Applies rotations with `IWICBitmapFlipRotator`, leveraging hardware acceleration for 90° increments.
  - Saves images using `IWICBitmapEncoder`, dynamically selecting the original container format (`decoder->GetContainerFormat`) to preserve file type fidelity.
  - Validates directory files as images by attempting `IWICBitmapDecoder` creation, ensuring broad format support without hardcoded extensions.

- **Graphics and Transformations**:
  - Renders images with `StretchBlt` in `HALFTONE` mode for high-quality scaling, optimized for various display DPIs.
  - Applies zoom and rotation via `SetWorldTransform`, centering images using matrix transformations for precise positioning.
  - Uses `CreateDIBSection` for direct pixel access, minimizing memory overhead (<10 MB for typical images).

- **File System Operations**:
  - Indexes directory images with `FindFirstFileW` and `FindNextFileW` using a `*.*` wildcard, filtering via WIC’s `IsImageFile` function for format-agnostic support.
  - Opens files with `FILE_SHARE_READ | FILE_SHARE_WRITE` and `STGM_SHARE_DENY_NONE` to prevent access conflicts, even in multi-process environments.
  - Deletes to Recycle Bin with `SHFileOperationW` and `FOF_ALLOWUNDO`, ensuring recoverable file operations.
  - Saves images atomically using temporary files (`MoveFileExW` with `MOVEFILE_REPLACE_EXISTING`) to handle file locks robustly.

### 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**:
    ```cmd
    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**:
    ```cmd
    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.

- **Offline Operation**:
  - No network activity or telemetry, ensuring complete data privacy and suitability for air-gapped systems.
  - Ideal for forensic, archival, or secure photography workflows.

- **Minimal Attack Surface**:
  - Compact codebase (~700 lines) facilitates manual audits and reduces vulnerability risks.
  - Relies exclusively on hardened Windows APIs and WIC, avoiding third-party library dependencies.
  - Strict memory management mitigates buffer overflows and leaks, validated with static analysis tools.

- **Safe File Handling**:
  - Opens files with shared access (`FILE_SHARE_READ | FILE_SHARE_WRITE`) to prevent lock-based exploits.
  - Saves via temporary files to ensure atomic writes, minimizing data loss risks.
  - Deletes to Recycle Bin with user confirmation, preventing accidental permanent data loss.

- **No Registry Modifications**:
  - Operates without persistent system changes, leaving no forensic footprint beyond the executable.

## 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

1. **Clone or Download**:
   - Clone the repository or download `MinimalImageViewer.cpp`, `resource.rc`, and `minimallogo.ico`.

2. **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.

3. **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.

4. **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:

1. Fork the repository.
2. Create a feature branch (`git checkout -b feature/YourFeature`).
3. Commit changes (`git commit -m "Add YourFeature"`).
4. Push to the branch (`git push origin feature/YourFeature`).
5. 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.**