[
https://issues.apache.org/jira/browse/IMAGING-270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17218732#comment-17218732
]
Bruno P. Kinoshita commented on IMAGING-270:
--------------------------------------------
I've reproduced the issue, and dumped the HTML output of exiftool for the two
images. It appears a lot of metadata (ICC profile data, Adobe Photoshop
segments) are ignored. Probably our parser is not being able to read them, or
the tags are not supported by the reader or writer. Will try to investigate
with more time later.
But thanks a lot for providing a test image, and the code snippet to reproduce
it [~syisunny]
> 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
> Priority: Minor
> 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)