Bar-codes, imagemagick, EXIF data.

Zbar

  • barcode scanning, qr codes

Imagemagick

montage

  • stich images together without wasted space montage T514.png T532.png T513.png T531.png -geometry +0 +0 -tile 2x3 out.png

Convert

  • svg to png preserving clear background convert -channel rgba -background "rgba(0,0,0,0)" in.svg out.png

Reduce image size

# Quick copy-paste (without changing resolution) is:
convert  -quality 85 in.jpg out.jpg

# change the resolution & keep aspect ratio
convert dragon_sm.gif    -resize 64x64  resize_dragon.gif

Probably a better way (if it it sufficient) is to use jpegoptim.

EXIF data extraction

# get location data
identify -verbose DSCN0042.jpg | grep GPS

# exif data in general
identify -format '%[EXIF:*]' img.jpg

# prettier output
exiv2 img.jpg

# Get images with GPS coords
ls | xargs -I {}  sh -c "(identify -verbose {} | rg -q 'exif:GPSLatitude:') && echo {}"

# Script for extracting coords
# https://bitbucket.org/Ja0Dar/dotfiles/raw/master/scripts/img2gps


# Strip exif data
convert image.jpg profile.icm
convert image.jpg -strip -profile profile.icm output.jpg