Skip to main content

Full screen photo slideshow

Project description

photoshow

Another photo slideshow module. This one was originally designed to run on a spare Raspberry Pi, with a copy of our photo library on a mounted USB stick, plugged into the back of our main family TV. It plays continuously, so during the ads or while waiting for a programme to start, we can flick the TV source and get a few random photos to reminisce for a moment or two. That's how this slideshow module came about, but it can show any photos, just point it at a folder and it can slideshow all the photos under it.

The slideshow uses the tkinter fullscreen option. To fill the display space nicely, as images have differing ratios, a white saturated abstract image is first created from the photo. This fills the background, with the main photo placed front and centre. An optional caption can be added based on the Exif data, filename, or folder name to complete each slide.

How to Use

The module can be run directly from the command line. For example for a slideshow of all the photos in the c:\temp directory would be:

python -m photoshow c:/temp

There are further configurable options, for these you can specifiy a parameter json file, see blow for parameter details.

python -m photoshow c:/temp/parameters.json

During the slideshow, use the spacebar or mouse button to move on to the next image, if you don't want to wait, and press escape or mouse double-click to end the show.

Parameters

Further configuarble parameters, incude whether captions are required and what font should they be in, the time each photo is displayed for, whether the photos should be randomised or played in order, should the slideshow repeat when it reaches the end, plus some others.

  • path: String, the path to the photo library. This is the only mandatory parameter.
  • caption: String or boolean, whether a caption should be added to the slide and if so which, options are: directory, detail, filename. Detail will try and use Exif data from the DateTimeOriginal and ImageDescription elements, falling back to the folder name if data is not found. Use False for no caption.
  • delay_time: Int, the time each photo is displayed for, default 15
  • delay_unit: String, either M minutes or S seconds
  • font_path: String, the true type font file, including path. I recommend Kalam-Bold.ttf which can be downloaded from Google Fonts,
  • max_photos: Int, the photo limit for the slideshow, enter 0 for unlimited.
  • random: Boolean, true if photos should be randomised, false will play the slides in order
  • repeat: Boolean, true starts over when all photos have been displayed, false will end the slideshow after one run through.
  • ignore: List, of directories and/or files that should not be shown in the slideshow. Only include the path from the photo_path location.

The parameters should be kept in a json file, such as:

{
  "captions": "detail",
  "delay_time": 2,
  "delay_unit": "S",
  "font_path": "C:/Temp/Kalam-Bold.ttf",
  "max_photos": 0,
  "path": "C:/Temp",
  "random": true,
  "repeat": true,
  "ignore": [
    "C:/Temp/ignoreme",
    "C:/Temp/ignoreonephoto/tipsy.jpg"
  ]
}

Environment

Tested on Python 3.7 and 3.10, on Windows 10 and Raspberry Pi OS.

Licence

This software is released under the MIT license, see LICENSE.

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

photoshow-1.0.1.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

photoshow-1.0.1-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: photoshow-1.0.1.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.9

File hashes

Hashes for photoshow-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3269186a136b0ad1c061a5ae46811d7ee6063b6579b822b72b255a23d3d9cfba
MD5 abe3a3af518431c94bfc7aed64cc18d1
BLAKE2b-256 79921251ff20fd015b4ac772a1e9d40082b8f50b06543b1d13c2d68f41c52b5e

See more details on using hashes here.

File details

Details for the file photoshow-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: photoshow-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.9

File hashes

Hashes for photoshow-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 07e8c09537d10e64ab783cdfd56099727da4aeb78eaa3bf184a0d4096268031e
MD5 5c50efd78b28164e08e3ec13d5d5a44a
BLAKE2b-256 2b70878bf1075ccb0cf59511a89571c1272d6f10fdde7bec9210f7ad19d07937

See more details on using hashes here.

Supported by

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