[ 
https://issues.apache.org/jira/browse/IMAGING-89?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Arthur Bogaart updated IMAGING-89:
----------------------------------

    Attachment: test-YCCK.jpg

Attached YCCK test image
                
> Detect the YCCK color space/type
> --------------------------------
>
>                 Key: IMAGING-89
>                 URL: https://issues.apache.org/jira/browse/IMAGING-89
>             Project: Commons Imaging
>          Issue Type: New Feature
>          Components: Format: JPEG
>    Affects Versions: 1.x
>            Reporter: Arthur Bogaart
>            Priority: Minor
>         Attachments: test-YCCK.jpg
>
>
> I use Sanselan/CommonsImaging to detect if uploaded images are in the RGB 
> color space, and if not convert them to RGB.
> Currently, CI marks jpg images in the YCCK color space as CMYK:
> ImageInfo info = Imaging.getImageInfo(is, "YCCK.jpg");
> info.getColorType() == ImageInfo.COLOR_TYPE_CMYK
> So I have to do a custom check afterwards to differ between YCCK and CMYK.
> I use the following to do this:
> import com.drew.imaging.jpeg.JpegSegmentReader;
> JpegSegmentReader reader = new JpegSegmentReader(is);
> byte[] appe = reader.readSegment(JpegSegmentReader.SEGMENT_APPE);
> bool isYCCK = appe != null && appe[11] == 2;
> Would it be possible to incorporate this into CommonsImaging?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to