trouble applying ICC profiles w/PerlMagick (works w/ImageMag

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
rlandis

trouble applying ICC profiles w/PerlMagick (works w/ImageMag

Post by rlandis »

I am trying to convert a CMYK image to RGB, using PerlMagick. The following works great for me in ImageMagick, but I can't figure out exactly what syntax to use in order to make it work in PerlMagick!

Code: Select all

convert input.pdf -profile USWebCoatedSWOP.icc -profile sRGB.icm -colorspace rgb -quality 100 output.jpg
Thanks!!
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: trouble applying ICC profiles w/PerlMagick (works w/ImageMag

Post by anthony »

As a precaution I would add a +profile icm before the first profile.
See http://www.imagemagick.org/Usage/formats/#colorspace
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
woy

Re: trouble applying ICC profiles w/PerlMagick (works w/ImageMag

Post by woy »

I have the very same problem and could not find any solution for that so far.
Profile() seems to only attach/embed a profile, but doesn't do conversion, Quantize() also doesn't do the trick, and I tried several combinations and variations, without success. So if somebody knows the solution please share :) Thx.

EDIT: Shortly after posting (as usual, thanks Murphy), I found out it actually DOES work (provided that the correct filenames are used... *blush*):

Code: Select all

  ...
  $imag->Profile( name => '.../cmyk/USWebCoatedSWOP.icc' );
  $imag->Profile( name => '.../rgb/ColorMatchRGB.icc' );
  $imag->Profile( profile => '' );   # delete embedded profiles to save space
  ...
Post Reply