Hi
Is there any way to save CMYK jpeg with original ICC profile?
First of all the problem in TImageEnIO.SaveToStreamJpeg where CMYK converted to 24RGB without ICC:
procedure TImageEnIO.SaveToStreamJpeg(Stream: TStream);
. . . .
if (fIEBitmap.pixelformat <> ie24RGB) and (fIEBitmap.PixelFormat <> ie1g) then
fIEBitmap.PixelFormat := ie24RGB;
. . . .
end;
And then a sad comment in WriteJPegStream:
procedure WriteJPegStream(...)
. . . .
if cinfo.in_color_space = JCS_CMYK then
begin
// converts RGB to CMYK
// (Params.JPEG_ColorSpace=ioJPEG_CMYK or params.JPEG_ColorSpace=ioJPEG_YCbCrK)
// IOParams=nil because we cannot use profiles on saving
IEConvertColorFunction(SrcScanline, iecmsBGR, buff, iecmsCMYK, cinfo.image_width, nil);
LinesWritten := jpeg_write_scanlines(cinfo, @buff, LinesPerCall);
end
. . . .
So as I understood for now pixels in CMYK jpeg stored as CMYK in default CMYK color profile but original jpeg ICC profile (which no more correct) also saved in jpeg.
P.S. I use old 4.1.0 version and wondering is workaround available in latest version?