Skip to main content

A fast PyQt5-based image viewer with URL support and navigation

Project description

QViewer

A fast, lightweight image viewer built with PyQt5 and optimized with Cython. Navigate through multiple images with keyboard shortcuts!

Features

  • 🖼️ View images from local files or URLs
  • ⚡ Auto-scaling to fit screen
  • 🎨 Frameless window design
  • ⌨️ Keyboard navigation (Arrow keys, Space)
  • 🔄 Cycle through multiple images
  • 📁 Directory scanning (with recursive depth control)
  • 📋 Clipboard support
  • 🚀 Cython-optimized for performance

Supported Formats

JPG, JPEG, PNG, GIF, BMP, TIFF, TIF, WEBP, ICO, SVG, HEIC, HEIF, AVIF, JFIF, APNG

Installation

pip install qviewer

Usage

Command Line

# View single image
qviewer image.jpg

# View multiple images (navigate with arrow keys)
qviewer img1.jpg img2.png img3.gif

# View all images in a directory
qviewer /path/to/images/

# View images in directory (max depth 2 subdirectories)
qviewer -d 2 /path/to/images/

# View only current directory (no subdirectories)
qviewer -d 0 /path/to/images/

# Mix files and directories
qviewer image1.jpg /path/to/more/images/ image2.png

# View image from URL
qviewer https://example.com/image.png

# Load from clipboard
qviewer c

Keyboard Shortcuts

  • Arrow Right / Arrow Down / Space - Next image
  • Arrow Left / Arrow Up - Previous image
  • Q / Escape - Quit

Python API

from qviewer import show, collect_all_images

# View single image
show(['/path/to/image.jpg'])

# View multiple images
images = [
    '/path/to/img1.jpg',
    '/path/to/img2.png',
    'https://example.com/img3.gif'
]
show(images)

# Collect images from directory and view
images = collect_all_images(['/path/to/images'], max_depth=2)
show(images)

Command Line Options

usage: qviewer [-h] [-d N] [paths ...]

positional arguments:
  paths              Image file(s), URL(s), or directory path(s)
                     Use "c" to load from clipboard

optional arguments:
  -h, --help         show help message and exit
  -d N, --depth N    Maximum directory recursion depth
                     (default: infinite, 0: current dir only)

Requirements

  • Python >= 3.7
  • PyQt5 >= 5.15.0
  • requests >= 2.25.0
  • clipboard >= 0.0.4

Examples

Browse vacation photos

qviewer ~/Pictures/Vacation2024/

Compare multiple screenshots

qviewer screenshot1.png screenshot2.png screenshot3.png

Review images from multiple directories

qviewer ~/Downloads/ ~/Pictures/Recent/ -d 1

Quick view from clipboard

# Copy image URL or path, then:
qviewer c

👤 Author

Hadi Cahyadi

Buy Me a Coffee

Donate via Ko-fi

Support me on Patreon

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qviewer-1.0.1.tar.gz (109.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qviewer-1.0.1-cp311-cp311-win_amd64.whl (162.7 kB view details)

Uploaded CPython 3.11Windows x86-64

File details

Details for the file qviewer-1.0.1.tar.gz.

File metadata

  • Download URL: qviewer-1.0.1.tar.gz
  • Upload date:
  • Size: 109.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for qviewer-1.0.1.tar.gz
Algorithm Hash digest
SHA256 9dcf5c8cd74fd527fd2ca8c49be20bb3557e1f896de11262c7cb8abef8083189
MD5 ab9cd76f0a2255a82bcbd08debdfdb77
BLAKE2b-256 7f87cfd0209af1c921ea2da39215ab787f92a2e1c28a45062e72d0203627cea5

See more details on using hashes here.

File details

Details for the file qviewer-1.0.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: qviewer-1.0.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 162.7 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for qviewer-1.0.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9a9f3f213ba19b0494246d666bd878384ed4453c8ad88399f7e1f3659c55a2ab
MD5 e6928c25dec89ae27d2e6ea645393665
BLAKE2b-256 e2a8d0f1b7346698cadfaf23a4746ef2564f76228ad1c8bce3ce206f64c494d4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page