Skip to content

Simple but featured image viewer, designed for speed when browsing network drives and on low power computers like Raspberry Pi 2

License

Notifications You must be signed in to change notification settings

antoniotejada/ImageViewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImageViewer

Simple but featured image viewer, designed for speed when browsing network drives and on low power computers like Raspberry Pi 2

Screenshots

64-bit Windows 10

imageviewer_win10 Castle Defence © Greg Rutkowski

32-bit Windows XP

imageviewer_winxp Castle Defence © Greg Rutkowski

32-bit Raspberry Pi LXDE

imageviewer_rpi Castle Defence © Greg Rutkowski

Installing

32-bit Raspberry OS

  1. Install Python 2.7
  2. sudo apt install python-pyqt5 (pip install python-qt5 fails with missing egg-info)

64-bit Windows 10

  1. Install Python 2.7
  2. pip install python-qt5 (or follow https://github.com/pyqt/python-qt5)

32-bit Windows XP

python-qt5 is a 64-bit Windows project so it doesn't work in 32-bit Windows XP, fortunately some versions of Anaconda do support PyQt5 and 32-bit Windows XP.

  1. Install Anaconda 2.2.0 which is the last Anaconda Python 2.7.x version that is known to work on XP (2.3.0 also seems to work, but has missing DLL paths at runtime). This will install Python 2.7.9
  2. Create a conda python 2.7 environment, this will install Python 2.7.13 in that environment.
  3. conda install PyQt5

Running

imageviewer.py [image/slideshow filepath]

LXDE File association

  1. Copy the .desktop file to .local\share\applications\imageviewer.desktop.
  2. If imageviewer.py is not in the path, modify the Exec= entry to the absolute path, eg
    Exec=/usr/bin/imageviewer.py %f
    
  3. Set the association with, eg
    xdg-mime default imageviewer.desktop image/jpeg
    
    Stored at ~\.config\mimeapps.list

Features

  • Uses PyQt5 and Python 2.7
  • Works on 32-bit Raspberry Pi 2 with LXDE
  • Works on 64-bit Windows 10, 32-bit Windows XP
  • Loads Qt-supported images (currently PyQt5 reports support for .bmp, .dds, .gif, .icns, .ico, .jp2, .jpeg, .jpg, .mng, .pbm, .pgm, .png, .ppm, .svg, .svgz, .tga, .tif, .tiff, .wbmp, .webp, .xbm, .xpm)
  • Play/pause animated images (currently only GIF, PyQt5 fails in different ways to support other animated image formats like APNG, MNG, multipage TIFF, animated WEBP)
  • Fast open dialog box on slow network drives, automatic deferral of file stat fetching after one second timeout, substring keyboard search, history navigation, directory path button navigation.
  • Slideshow of current image directory
  • Pseudo numeric file sorting for open dialog and slideshow of current image directory
  • Support for .lst files for slideshow contents (text files with newline-separated filepaths, absolute or relative to the .lst filepath)
  • Background next/previous image prefetching
  • Image rotation in 90 degree increments
  • Image gamma correction
  • Image largest/smallest dimension fit to window
  • Page scrolling when in fit to smallest
  • Fullscreen mode
  • Keyboard and mouse support (doubleclick to toggle fullscreen, wheel for next/previous image, middle click to start/stop slideshow)
  • Copy / paste image path from clipboard
  • Paste newline-separated paths as slideshow contents

Requirements

  • Python 2.7
  • PyQt5
  • Numpy (optional, otherwise gamma correction will be disabled)

Todo

  • Bugfixing
  • Better error handling
  • More command line options (debug level, open from clipboard, etc)
  • Code cleanup
  • More image filters (brightness, contrast, auto-gamma, etc)
  • Save configuration, window & dialog position