Skip to content

Latest commit

 

History

History
123 lines (90 loc) · 3.73 KB

README.md

File metadata and controls

123 lines (90 loc) · 3.73 KB

gaaqoo

PyPI version Build Status Code Health Coverage Status

Convert images into ones suitable for digital photo frames.

  • Reduce file size to save SD card spaces: Scale down images to fit just to the screen size of your digital photo frame.
  • Ajdust orientation: Rotate images based on EXIF Orientation.
  • Overlay shooting datetime: Overlay EXIF DataTimeOriginal.
  • Convert smart: Detect new or updated images in src directory recursively, and convert those into dst directory.

'gaaqoo' was named after 'gaku' which means 'frame' in Japanese.


Install

PyPI version

$ pip install gaaqoo

Usage

$ gaaqoo --help
usage: gaaqoo [-h] [-V] [-f FILE.yml]

Convert images into ones suitable for digital photo frames.

optional arguments:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  -f FILE.yml, --config FILE.yml
                        config YAML file (default:
                        ~/.config/gaaqoo/default.yml)
$

Config (YAML)

~/.config/gaaqoo/default.yml (have to create by yourself for now.)

# -*- coding: utf-8 -*-

SRC_DIR: ~/Pictures/gaaqoo-src
DST_DIR: ~/Pictures/gaaqoo-dst
SUFFIX: ['.jpg', '.JPG', '.jpeg', '.JPEG']
# exclude if filepath contains there
EXCLUDE: ['_EXCLUDE_', '_NG_']
DST_IMG_SIZE: [800, 480]
FONT: /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf
FONT_SIZE: 30

Example

Nagoya Castle :-)

image width x height orientation
src 4320x3240 [EXIF] Orientation=6 (Rotate 90 CW)
dst 360x480 (fits for 800x480) Horizontal (normal)

License

MIT License

Dependencies

$ cat requirements.txt | xargs -n1 yolk -l -f License,Author,Home-page,Summary | egrep -v '^Versions with'
Pillow (3.3.1)
    Summary: Python Imaging Library (Fork)
    Home-page: http://python-pillow.org
    Author: Alex Clark (Fork Author)
    License: Standard PIL License

PyYAML (3.12)
    Summary: YAML parser and emitter for Python
    Home-page: http://pyyaml.org/wiki/PyYAML
    Author: Kirill Simonov
    License: MIT

$

For developers

EXIF orientation example images

Image rotation based on EXIF orientation when tools show it

Without rotation, so suitable for debugging:

  • display (ImageMagick)

With rotation:

  • display -auto-orient
  • nautilus (file manager)
  • eog

EXIF tools

  • ExifTool
    • exiftool example.jpg
  • jhead:
    • jhead example.jpg
    • jhead -autorot example.jpg
  • Exiv2: exiv2 -pv example.jpg
$ jhead -autorot example.jpg
$ jhead -mkexif example.jpg  # keep DateTimeOriginal. drop GPS, Orientation, and others.
$ exiftool example.jpg