Search code examples
imagemagickimagemagick-convert

imagemagick convert RGB PNG to CMYK PDF


I am trying to create a PDF file using Latex. However, Latex does not handle TIFF or any other image format capable of both transparency and CMYK. The only solution I think I can use is to convert the PNG image to PDF and embed those in the file.

I am somewhat familiar with imagemagick, however, I am having trouble figuring out how to convert a PNG (probably in the RGB/SRGB colour space) to a PDF in the CMYK colour space.

How do I go about doing this conversion so that the colours are correct and the transparency remains?


Solution

  • In Imagemagick, you should use a CMYK type profile to do the conversion:

    convert input.png -profile USWebCoatedSWOP.icc output.pdf
    

    Note, however, that Imagemagick will simply put the raster image into a vector PDF shell. It will not vectorize the image.