Page 1 of 1

CMYK PDF to sRGB JPG

Posted: 2012-05-23T05:25:13-07:00
by rusli
Hi,

I've been googling for a couple of days now and so far no result, I would greatly appreciate some help with this.

I'm trying to convert CMYK PDFs into an sRGB images. My problem is a faint yellow shows up in the background of images from the PDF as well as resulting JPG colors are not matching well enough.

Version info:
GPL Ghostscript 9.02 (2011-03-30)
ImageMagick 6.7.7-0 2012-05-23 Q16
Sample data:
In PDF: http://dl.dropbox.com/u/45955/in.pdf
Out JPG example: http://dl.dropbox.com/u/45955/out.jpg

Color profiles I used I got from Adobe web site.

Commands I have tried among others:

Code: Select all

convert in.pdf -profile sRGB.icm out.jpg
Result: Get this error when opening image in Photoshop: The embedded ICC profile cannot be used because the ICC profile is invalid. Ignoring the profile.

Code: Select all

convert -profile USWebCoatedSWOP.icc in.pdf  -profile sRGB.icm out.jpg
Result: Image is sRGB and color conversion is not the best, there is also faint yellow background under image (probably white did not convert well?). http://dl.dropbox.com/u/45955/out.jpg I have also tried USWebUncoated.icc, better colors overall but still the faint yellow background.

PDF information:

Code: Select all

identify -verbose in.pdf
Image: in.pdf
  Format: PDF (Portable Document Format)
  Class: DirectClass
  Geometry: 652x899+0+0
  Resolution: 72x72
  Print size: 9.05556x12.4861
  Units: Undefined
  Type: ColorSeparation
  Base type: ColorSeparation
  Endianess: Undefined
  Colorspace: CMYK
  Depth: 16/8-bit
  Channel depth:
    cyan: 8-bit
    magenta: 8-bit
    yellow: 8-bit
    black: 8-bit
  Channel statistics:
    Cyan:
      min: 0 (0)
      max: 49601 (0.756863)
      mean: 1143.59 (0.0174501)
      standard deviation: 5736.15 (0.0875281)
      kurtosis: 39.136
      skewness: 6.17317
    Magenta:
      min: 0 (0)
      max: 30583 (0.466667)
      mean: 571.142 (0.00871507)
      standard deviation: 2291.84 (0.0349713)
      kurtosis: 36.2905
      skewness: 5.54346
    Yellow:
      min: 0 (0)
      max: 65535 (1)
      mean: 1635.46 (0.0249555)
      standard deviation: 7107.55 (0.108454)
      kurtosis: 43.701
      skewness: 6.50586
    Black:
      min: 0 (0)
      max: 6682 (0.101961)
      mean: 7.07931 (0.000108023)
      standard deviation: 70.7784 (0.00108001)
      kurtosis: 832.521
      skewness: 19.9503
  Image statistics:
    Overall:
      min: 0 (0)
      max: 65535 (1)
      mean: 839.318 (0.0128072)
      standard deviation: 4708.46 (0.0718465)
      kurtosis: 85.9549
      skewness: 8.89549
  Total ink density: 202%
  Rendering intent: Undefined
  Interlace: None
  Background color: cmyk(255,255,255,0)
  Border color: cmyk(223,223,223,0)
  Matte color: cmyk(189,189,189,0)
  Transparent color: cmyk(0,0,0,0)
  Compose: Over
  Page geometry: 652x899+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Undefined
  Orientation: Undefined
  Properties:
    date:create: 2012-05-23T17:05:16+06:00
    date:modify: 2012-05-23T17:05:16+06:00
    pdf:HiResBoundingBox: 652x899+0+0
    pdf:Version: PDF-1.6
    signature: 2dea92ab09df4e2a80bcb9d9a07c2d32fc1ffb46aaeb29bdc97b76b9a91b21fd
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 2.345MBB
  Number pixels: 586KB
  Pixels per second: 29.31MB
  User time: 0.010u
  Elapsed time: 0:01.019
  Version: ImageMagick 6.7.1-7 2011-08-27 Q16 http://www.imagemagick.org
Thank you!

Re: CMYK PDF to sRGB JPG

Posted: 2012-05-23T13:19:27-07:00
by rusli
Anyone? Pretty please :)

Re: CMYK PDF to sRGB JPG

Posted: 2012-05-23T14:12:47-07:00
by fmw42
You will get different color greens with different profiles. You will just have to try variations with different versions of CMYK and sRGB or RGB profiles.


this is a bit lighter green
convert -profile Profiles/USWebCoatedSWOP.icc in.pdf -profile Profiles/sRGB.icc out.jpg

this is a bit closer
convert -profile Profiles/CMYK.icc in.pdf -profile Profiles/sRGB.icc out2.jpg


Note that the same profile from different sources may even be different. So unless you can find out how the CMYK pdf was created, you may not be able to get a perfect match.