extracting channels from a PDF

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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

It appears your PDF is not CMYK or at least ImageMagick interprets it as RGB. ImageMagick must find DeviceCMYK in the image file to interpret it as CMYK. Post a URL to your image so we can confirm.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

We need to put a small patch in ImageMagick 6.2.6-5 Beta and with it you could use this command to produce a CMYK image from a RGB PDF:
  • convert -colorspace CMYK image.pdf cmyk.jpg
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

There is patch that is required for this to work properly. The patch will be in ImageMagick 6.2.6-5 Beta available tommorrow at ftp://ftp.imagemagick.org/pub/ImageMagick/beta.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

And that's why we call it beta. Edit magick/layers.c and change 'static MagickExport' to just 'static'. If that fails, grab the source from ImageMagick-6.2.6-3 and replace coders/pdf.c with the version from ImageMagick-6.2.6-4 Beta.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

We have staging areas for development code. The PDF patch was in a staging area that has not quite made it to release status. It will be in the next point release. Look for an update to ImageMagick-6.2.6-6 within 48 hours.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Seems to work for us with ImageMagick-6.2.6-6. We get a black channal that is all zero pixels with this command:
  • convert -colorspace cmyk test.pdf -channel Black -separate test_black.bmp
Now all zero pixels may not be what you want but that is what Ghostscript is giving us. As we suggested earlier, the best solution is to create an RGB image and use proper color profiles to convert the RGB to the CMYK colorspace.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

You could try going to http://www.adobe.com or http://www.appligent.com to see if they have a solution for you. Or try working directly with Ghostscript, they have multiple devices for producing CMYK that may give you what you want.
Post Reply