[ 
https://issues.apache.org/jira/browse/IMAGING-270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17224106#comment-17224106
 ] 

Yi SONG commented on IMAGING-270:
---------------------------------

Hi, 

Just for information: The image reading and writing works well with 
twelvemonkeys lib: [https://github.com/haraldk/TwelveMonkeys]

 

from their code, it checks the Adobe segment at segment 0xFFEE first just after 
reading the contents

> 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)

Reply via email to