0

I know that RGB is for monitors and CMYK is for printing, but I want to work with CMYK without any conversions. I want to upload a CMYK image (jpeg) and print it. But when I used com.sun.image.codec.jpeg.JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(is); return decoder.decodeAsBufferedImage(); I got an inversed colors image. How can I get the same image in CMYK?

Filosssof
  • 1,288
  • 3
  • 17
  • 37

1 Answers1

2

There reason your colors are inverted is that you have a special variant of a CMYK JPEG image, namely Adobe CYYK. The strange colors are due to an old Photoshop bug (CMYK values are inverted) that has now become a de-facto standard that's handled by most JPEG software (except Java).

A proper CMYK conversion (handling different variants, using proper color profile etc.) can be found in: https://stackoverflow.com/a/12132630/413337.

Community
  • 1
  • 1
Codo
  • 75,595
  • 17
  • 168
  • 206