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: 11073
Joined: 2003-05-31T11:32:55-07:00

Post by magick » 2006-03-15T08:50:45-07:00

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: 11073
Joined: 2003-05-31T11:32:55-07:00

Post by magick » 2006-03-15T10:38:32-07:00

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: 11073
Joined: 2003-05-31T11:32:55-07:00

Post by magick » 2006-03-15T10:53:05-07:00

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: 11073
Joined: 2003-05-31T11:32:55-07:00

Post by magick » 2006-03-16T07:56:19-07:00

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: 11073
Joined: 2003-05-31T11:32:55-07:00

Post by magick » 2006-03-21T11:29:36-07:00

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: 11073
Joined: 2003-05-31T11:32:55-07:00

Post by magick » 2006-03-28T12:40:35-07:00

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: 11073
Joined: 2003-05-31T11:32:55-07:00

Post by magick » 2006-03-29T08:56:26-07:00

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