Skip to content

Instantly share code, notes, and snippets.

@vguerrerobosch
Created June 20, 2020 19:31
Show Gist options
  • Save vguerrerobosch/a3386145ae362413397e03aa58719920 to your computer and use it in GitHub Desktop.
Save vguerrerobosch/a3386145ae362413397e03aa58719920 to your computer and use it in GitHub Desktop.
Create duotone images with ImageMagick
# Create Color Look Up Table
convert -size 1x1 xc:#008cff xc:#ffffff +append clut.gif
# Create gradient
convert -size 20x256 gradient: -rotate 90 clut.gif -interpolate bilinear -clut gradient.gif
# PNG to JPG
mogrify -format jpg *.png
# Convert to grayscale
mogrify -path grayscale -colorspace Gray *.jpg
# Create duotone images
for file in *.jpg; do convert $file clut.gif -interpolate bilinear -clut duotone/$file; done
# Resize
mogrify -path resized -resize 1920x1440\> *.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment