Details
-
New Feature
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.x
-
None
Description
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?