Skip to content

Instantly share code, notes, and snippets.

@comstock
Last active April 10, 2023 18:55
Show Gist options
  • Select an option

  • Save comstock/73b4d456f725e3636b79da38dbb6d9df to your computer and use it in GitHub Desktop.

Select an option

Save comstock/73b4d456f725e3636b79da38dbb6d9df to your computer and use it in GitHub Desktop.
Example: ICC profile-to-profile conversion using Imagemagick via command-line

Example showing how to perform an ICC profile-to-profile conversion using ImageMagick.

  1. Download test image: wget -O in.tif https://storage.googleapis.com/comstock.cc/icc/ICC_profile_test_image_Farbkreis_120grad.tif
  • Wanna see which ICC profile is embedded in the test image, in.tif? Run: exiftool -ProfileDescription in.tif
  1. Download an ICC profile: wget -O sRGB_ICC_v4_Appearance.icc https://storage.googleapis.com/comstock.cc/icc/sRGB_ICC_v4_Appearance.icc
  • Wanna extract the ICC profile from an image? Run: convert in.tif in.icc
  1. Using ImageMagick, convert the test image (in.tif) with its embedded ColorSpin ICC profile to an image (out.tif) with an embedded sRGB ICC profile:

convert in.tif -profile ./sRGB_ICC_v4_Appearance.icc out.tif

  • Wanna see which ICC profile is embedded in the output tiff file, out.tif? Run: exiftool -ProfileDescription out.tif
@comstock
Copy link
Author

comstock commented Jun 6, 2021

Convert the ICC profiles for a group of images via shell script

for i in *.tif; do echo "Processing $i"; convert $i -profile ./sRGB_ICC_v4_Appearance.icc $i ; done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment