Skip to content

Zaid-L9/Image-Viewer

Repository files navigation

Image Viewer - Screenshot & Pixel Inspector

A Windows application for capturing screenshots, inspecting pixels, and saving image regions with configurable global hotkeys.

~ Heavily inspired by Spawnnova's Shin Image Viewer

Features

1. Screenshot Capture

  • Configurable hotkey to capture entire screen (default: F9)
  • Configurable hotkey for taking new screenshots (default: Ctrl+Shift+N)
  • Configurable hotkey to exit program (default: Ctrl+Shift+Q)
  • Displays captured screenshot in resizable window (default 800x600)

2. Pixel Analysis

  • Real-time hex color display of pixel under mouse cursor
  • Small colored square showing the actual color
  • Live coordinate display of current mouse position:
    • Screen coordinates (absolute)
    • Image coordinates (relative to screenshot)
  • All information displayed in top-left panel

3. Region Selection

  • Drag to select rectangular regions
  • Shows coordinates for selected region:
    • Absolute screen coordinates (e.g., 773, 711)
    • Relative coordinates within screenshot (e.g., 12, 12)
  • Save selected region as PNG with configurable hotkey (default: Ctrl+Shift+P)
  • File dialog for choosing save location
  • Error message if trying to save with no region selected

4. Zoom & Navigation

  • Mouse wheel zoom up to 8x magnification
  • Movable magnifier window showing zoomed pixels around cursor:
    • Positioned in top-right corner by default (not center)
    • Drag by title bar or content area to move anywhere on screen
    • Toggle visibility via View menu ("Show Magnifier")
    • Stays on top for easy access
  • Zoom controls in View menu:
    • Zoom In (Ctrl++)
    • Zoom Out (Ctrl+-)
    • Reset Zoom

5. UI & Settings

  • Single resizable window displaying screenshot
  • Top-left info panel with color/coordinate info
  • Settings dialog to configure:
    • All hotkey assignments
    • Coordinate display format (absolute first or relative first)
    • Hex color format (uppercase or lowercase)
  • Save settings - hotkey assignments, coordinates, hex color values persist between sessions

Installation

  1. Make sure you have Python 3.9 or later installed
  2. Install required dependencies:
    pip install -r requirements.txt

Usage

  1. Run the application:

    python main.py
  2. Use the default hotkeys or configure your own:

    • F9: Capture screen
    • Ctrl+Shift+N: New screenshot
    • Ctrl+Shift+P: Save selected region
    • Ctrl+Shift+Q: Exit application
  3. After capturing a screenshot:

    • Move mouse to see pixel colors and coordinates
    • Drag to select a region
    • Use mouse wheel to zoom in/out
    • Save selected regions as PNG files

Configuration

Settings are stored in settings.json and include:

  • Hotkey assignments for all actions
  • Window position and size
  • Display preferences (coordinate format, hex color format)
  • Last used save directory

Tips

  • The magnifier window shows an 8x zoomed view of pixels around your cursor and can be moved by dragging
  • Position the magnifier anywhere on screen - it starts in the top-right corner to avoid overlapping the main window
  • Toggle the magnifier on/off using View → Show Magnifier menu option
  • You can access all functions through the menu bar if you forget hotkeys
  • The application hides itself temporarily when capturing to avoid being in the screenshot
  • All hotkeys work globally (even when the application is not in focus)

Requirements

  • Windows OS (uses Windows-specific screen capture)
  • Python 3.9+
  • PyQt5 (more stable with Python 3.9 than PyQt6)
  • Pillow (PIL)
  • pynput
  • Microsoft Visual C++ Redistributables (if not already installed)

Troubleshooting

If you encounter a "DLL load failed" error when running the application:

  1. Run install_vcredist.bat to install Microsoft Visual C++ Redistributables
  2. Make sure you have installed the dependencies with: pip install -r requirements.txt
  3. If the error persists, try reinstalling PyQt5: pip uninstall PyQt5 then pip install PyQt5

About

A Windows desktop application made with Python 3.9 for capturing screenshots, inspecting pixel data, and saving image regions. Features real-time hex color display, coordinate tracking, region selection, zoom functionality, and a movable magnifier window. Built with Python 3.9+ and PyQt5, with configurable global hotkeys.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors