ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Save CMYK jpeg with ICC profile
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

goobit

11 Posts

Posted - Aug 21 2015 :  03:14:51  Show Profile  Reply
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?

xequte

38514 Posts

Posted - Aug 25 2015 :  04:36:25  Show Profile  Reply
Hi

I'm afraid ImageEn cannot load or save a CMYK-JPEG and preserve the ICC profile.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: