You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Yi SONG (Jira)" <ji...@apache.org> on 2020/10/21 14:00:00 UTC

[jira] [Created] (IMAGING-270) CMYK jpg file is not supported

Yi SONG created IMAGING-270:
-------------------------------

             Summary: CMYK jpg file is not supported
                 Key: IMAGING-270
                 URL: https://issues.apache.org/jira/browse/IMAGING-270
             Project: Commons Imaging
          Issue Type: Bug
    Affects Versions: 1.0-alpha2
         Environment: Jave 8, WIN7 64bits, Eclipse JEE 2020-03
            Reporter: Yi SONG
         Attachments: Channel_digital_image_CMYK_color.jpg

Hi,

It seems that the attached cmyk jpg file is not supported. after writing back to jpg, it becomes black.

read:

bufferedImage = Imaging.getBufferedImage(filecontents);

filecontents is the path to the image file.

write:

ByteArrayOutputStream bos = new ByteArrayOutputStream();
 ImageIO.write(bufferedImage, "jpg", bos);
 byte[] result = bos.toByteArray();
 System.out.println(result.length);
 ImageIO.write(bufferedImage, "JPG", outFile);



--
This message was sent by Atlassian Jira
(v8.3.4#803005)