mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
2.2 KiB
2.2 KiB
ImageMagick
Components:
compare: diff toolconvert: image conversion tool
Table of contents
TL;DR
# Scale images to 50% its original size.
magick convert -adaptive-resize '50%' 'in.jpg' 'out.jpg'
ls -1 *.jpeg | parallel -qt magick convert -adaptive-resize '50%' {} scaled_{}
# Create GIFs from single images.
magick *.jpg 'out.gif'
# Convert N images into individual PDF documents.
magick *.jpg +adjoin 'page-%d.pdf'
# Convert N images into pages of a single PDF document.
magick *.png 'out.pdf'
# Calculate the percentage of *similarity* between 2 images.
# Avoid saving the diff.
magick compare -metric 'NCC' 'in_1.jpg' 'in_2.jpg' NULL:
# Output only the differences between 2 images.
magick compare -compose 'src' -fuzz '5%' 'in_1.jpg' 'in_2.jpg' 'diff.jpg'
Further readings
Sources
All the references in the further readings section, plus the following: