convert to CMYK error

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Fahad
Posts: 3
Joined: 2013-10-01T04:19:26-07:00
Authentication code: 6789

convert to CMYK error

Post by Fahad »

Hi,

I am using ImageMagick 6.8.7 and I want to convert my book cover to CMYK with a special profile. However, when I use the following command

Code: Select all

convert bookcover.tiff -debug -profile WebCoatedSWOP2006Grade5.icc bookcover-cmyk-adobe.jpg
I got this and the file remains in RGB

Code: Select all

convert: unrecognized event type `-profile' @ error/convert.c/ConvertImageCommand/1149
any help?
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: convert to CMYK error

Post by dlemstra »

You need so specify the event type for the debug parameter: http://www.imagemagick.org/script/comma ... .php#debug

Code: Select all

convert bookcover.tiff -debug All -profile WebCoatedSWOP2006Grade5.icc bookcover-cmyk-adobe.jpg
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Fahad
Posts: 3
Joined: 2013-10-01T04:19:26-07:00
Authentication code: 6789

Re: convert to CMYK error

Post by Fahad »

Thanks dlemstra for the hit. This is what I get

Code: Select all

convert bookcover.tiff -debug ALL -profile WebCoatedSWOP2006Grade5.icc  bookcover-cmyk-adobe.tiff 
2013-10-01T16:34:05+04:00 0:00.000 0.000u 6.8.7 Configure convert[8935]: utility.c/ExpandFilenames/941/Configure
  Command line: /usr/local/bin/convert {bookcover.tiff} {-debug} {ALL} {-profile} {WebCoatedSWOP2006Grade5.icc} {bookcover-cmyk-adobe.tiff}
2013-10-01T16:34:05+04:00 0:00.000 0.000u 6.8.7 Policy convert[8935]: policy.c/IsRightsAuthorized/485/Policy
  Domain: Path; rights=Read; pattern="bookcover.tiff" ...
2013-10-01T16:34:05+04:00 0:00.000 0.000u 6.8.7 Blob convert[8935]: blob.c/OpenBlob/2536/Blob
    read 3 magic header bytes
2013-10-01T16:34:05+04:00 0:00.000 0.000u 6.8.7 Cache convert[8935]: cache.c/DestroyPixelCache/956/Cache
  destroy 
2013-10-01T16:34:05+04:00 0:00.000 0.000u 6.8.7 Configure convert[8935]: configure.c/GetConfigureOptions/589/Configure
  Searching for configure file: "/usr/local/share/ImageMagick-6/magic.xml"
2013-10-01T16:34:05+04:00 0:00.000 0.000u 6.8.7 Configure convert[8935]: configure.c/GetConfigureOptions/589/Configure
  Searching for configure file: "/usr/local/lib/ImageMagick-6.8.7//config-Q16/magic.xml"
2013-10-01T16:34:05+04:00 0:00.000 0.000u 6.8.7 Configure convert[8935]: configure.c/GetConfigureOptions/589/Configure
  Searching for configure file: "/usr/local/etc/ImageMagick-6/magic.xml"
2013-10-01T16:34:05+04:00 0:00.000 0.000u 6.8.7 Configure convert[8935]: configure.c/GetConfigureOptions/589/Configure
  Searching for configure file: "/usr/local/share/doc/ImageMagick-6/magic.xml"
2013-10-01T16:34:05+04:00 0:00.000 0.000u 6.8.7 Configure convert[8935]: configure.c/GetConfigureOptions/589/Configure
  Searching for configure file: "/home/ita4/.magick/magic.xml"
2013-10-01T16:34:05+04:00 0:00.000 0.000u 6.8.7 Configure convert[8935]: magic.c/LoadMagicList/681/Configure
  Loading magic configure file "/usr/local/etc/ImageMagick-6/magic.xml" ...
2013-10-01T16:34:05+04:00 0:00.000 0.000u 6.8.7 Policy convert[8935]: policy.c/IsRightsAuthorized/485/Policy
  Domain: Coder; rights=Read; pattern="TIFF" ...
2013-10-01T16:34:05+04:00 0:00.000 0.000u 6.8.7 Policy convert[8935]: policy.c/IsRightsAuthorized/485/Policy
  Domain: Path; rights=Read; pattern="bookcover.tiff" ...
2013-10-01T16:34:05+04:00 0:00.000 0.000u 6.8.7 Blob convert[8935]: blob.c/OpenBlob/2536/Blob
    read 3 magic header bytes
2013-10-01T16:34:05+04:00 0:00.000 0.000u 6.8.7 Cache convert[8935]: cache.c/DestroyPixelCache/956/Cache
  destroy 
2013-10-01T16:34:05+04:00 0:00.000 0.000u 6.8.7 Policy convert[8935]: policy.c/IsRightsAuthorized/485/Policy
  Domain: Path; rights=Read; pattern="bookcover.tiff" ...
2013-10-01T16:34:05+04:00 0:00.000 0.000u 6.8.7 Blob convert[8935]: blob.c/OpenBlob/2536/Blob
    read 3 magic header bytes
2013-10-01T16:34:05+04:00 0:00.000 0.000u 6.8.7 Coder convert[8935]: tiff.c/ReadTIFFImage/1055/Coder
  Geometry: 3722x2554
2013-10-01T16:34:05+04:00 0:00.000 0.000u 6.8.7 Coder convert[8935]: tiff.c/ReadTIFFImage/1057/Coder
  Interlace: 1
2013-10-01T16:34:05+04:00 0:00.000 0.000u 6.8.7 Coder convert[8935]: tiff.c/ReadTIFFImage/1059/Coder
  Bits per sample: 8
2013-10-01T16:34:05+04:00 0:00.010 0.000u 6.8.7 Coder convert[8935]: tiff.c/ReadTIFFImage/1061/Coder
  Min sample value: 0
2013-10-01T16:34:05+04:00 0:00.010 0.000u 6.8.7 Coder convert[8935]: tiff.c/ReadTIFFImage/1063/Coder
  Max sample value: 255
2013-10-01T16:34:05+04:00 0:00.010 0.000u 6.8.7 Coder convert[8935]: tiff.c/ReadTIFFImage/1065/Coder
  Photometric interpretation: RGB
2013-10-01T16:34:05+04:00 0:00.010 0.000u 6.8.7 Coder convert[8935]: tiff.c/ReadTIFFImage/1072/Coder
  Image depth: 8
2013-10-01T16:34:05+04:00 0:00.010 0.010u 6.8.7 Resource convert[8935]: resource.c/AcquireMagickResource/278/Resource
  Area: 76.05MB/76.05MB/8.2213GB
2013-10-01T16:34:05+04:00 0:00.010 0.010u 6.8.7 Resource convert[8935]: resource.c/AcquireMagickResource/278/Resource
  Memory: 76.05MB/72.52MiB/3.8283GiB
2013-10-01T16:34:05+04:00 0:00.010 0.010u 6.8.7 Cache convert[8935]: cache.c/OpenPixelCache/3571/Cache
  open bookcover.tiff[0] (Heap Memory, 3722x2554 72.52MiB)
2013-10-01T16:34:06+04:00 0:00.440 0.440u 6.8.7 Policy convert[8935]: policy.c/IsRightsAuthorized/485/Policy
  Domain: Path; rights=Read; pattern="WebCoatedSWOP2006Grade5.icc" ...
2013-10-01T16:34:06+04:00 0:00.440 0.440u 6.8.7 Blob convert[8935]: blob.c/OpenBlob/2536/Blob
    read 3 magic header bytes
2013-10-01T16:34:06+04:00 0:00.440 0.440u 6.8.7 Cache convert[8935]: cache.c/DestroyPixelCache/956/Cache
  destroy 
2013-10-01T16:34:06+04:00 0:00.440 0.440u 6.8.7 Policy convert[8935]: policy.c/IsRightsAuthorized/485/Policy
  Domain: Coder; rights=Read; pattern="ICC" ...
2013-10-01T16:34:06+04:00 0:00.440 0.440u 6.8.7 Policy convert[8935]: policy.c/IsRightsAuthorized/485/Policy
  Domain: Path; rights=Read; pattern="WebCoatedSWOP2006Grade5.icc" ...
2013-10-01T16:34:06+04:00 0:00.440 0.440u 6.8.7 Blob convert[8935]: blob.c/OpenBlob/2536/Blob
    read 3 magic header bytes
2013-10-01T16:34:06+04:00 0:00.440 0.440u 6.8.7 Cache convert[8935]: cache.c/DestroyPixelCache/956/Cache
  destroy 
2013-10-01T16:34:06+04:00 0:00.440 0.440u 6.8.7 Policy convert[8935]: policy.c/IsRightsAuthorized/485/Policy
  Domain: Path; rights=Read; pattern="WebCoatedSWOP2006Grade5.icc" ...
2013-10-01T16:34:06+04:00 0:00.440 0.440u 6.8.7 Blob convert[8935]: blob.c/OpenBlob/2536/Blob
    read 3 magic header bytes
2013-10-01T16:34:06+04:00 0:00.440 0.440u 6.8.7 Resource convert[8935]: resource.c/AcquireMagickResource/278/Resource
  Area: 8B/8B/8.2213GB
2013-10-01T16:34:06+04:00 0:00.440 0.440u 6.8.7 Resource convert[8935]: resource.c/AcquireMagickResource/278/Resource
  Memory: 8B/72.52MiB/3.8283GiB
2013-10-01T16:34:06+04:00 0:00.440 0.440u 6.8.7 Cache convert[8935]: cache.c/OpenPixelCache/3571/Cache
  open WebCoatedSWOP2006Grade5.icc[0] (Heap Memory, 1x1 8B)
2013-10-01T16:34:06+04:00 0:00.470 0.460u 6.8.7 Cache convert[8935]: cache.c/DestroyPixelCache/956/Cache
  destroy 
2013-10-01T16:34:06+04:00 0:00.470 0.460u 6.8.7 Policy convert[8935]: policy.c/IsRightsAuthorized/485/Policy
  Domain: Coder; rights=Write; pattern="TIFF" ...
2013-10-01T16:34:06+04:00 0:00.470 0.460u 6.8.7 Policy convert[8935]: policy.c/IsRightsAuthorized/485/Policy
  Domain: Path; rights=Write; pattern="bookcover-cmyk-adobe.tiff" ...
2013-10-01T16:34:06+04:00 0:00.480 0.470u 6.8.7 Policy convert[8935]: policy.c/IsRightsAuthorized/485/Policy
  Domain: Path; rights=Write; pattern="bookcover-cmyk-adobe.tiff" ...
2013-10-01T16:34:06+04:00 0:00.660 0.630u 6.8.7 Cache convert[8935]: cache.c/DestroyPixelCache/956/Cache
  destroy bookcover.tiff[0]
2013-10-01T16:34:06+04:00 0:00.670 0.640u 6.8.7 Resource convert[8935]: resource.c/RelinquishMagickResource/851/Resource
  Memory: 76.05MB/8B/3.8283GiB
2013-10-01T16:34:06+04:00 0:00.670 0.640u 6.8.7 Cache convert[8935]: cache.c/DestroyPixelCache/956/Cache
  destroy WebCoatedSWOP2006Grade5.icc[0]
2013-10-01T16:34:06+04:00 0:00.670 0.640u 6.8.7 Resource convert[8935]: resource.c/RelinquishMagickResource/851/Resource
  Memory: 8B/0B/3.8283GiB
but the convertion is not complete. The image still in sRGB. Any Help
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: convert to CMYK error

Post by magick »

You need two profiles. If the input image does not include an sRGB profile, add it with -profile, e.g. image.tiff -profile sRGB.icc -profile WebCoatedSWOP2006Grade5.icc.
Fahad
Posts: 3
Joined: 2013-10-01T04:19:26-07:00
Authentication code: 6789

Re: convert to CMYK error

Post by Fahad »

It works. Thanks
Post Reply