Re: [Lcms-user] Difficulty with cmsTransform in C#
An ICC-based CMM for color management
                
                Brought to you by:
                
                    mm2
                    
                
            
            
        
        
        
    | 
      
      
      From: Roger B. <gr...@vi...> - 2016-07-06 23:58:08
      
     | 
| Edgar,
You wrote :
> // create lcms inputprofile
>  IntPtr inputProfileH = IntPtr.Zero;
>I f (biFrm.ColorContexts != null) {
>	byte[] inputProfile =
> StreamToArray(biFrm.ColorContexts[0].OpenProfileStream());
> 	inputProfileH =
> Basic.Lcms.NativeMethods.cmsOpenProfileFromMem(inputProfile,
> (uint)inputProfile.Length);
Does this code actually work for you?
First of all, when creating a BitmapFrame with PreservePixelFormats the
ColorContext is *always* nill!!!
It does not work for me, with the JPEG files I tried.
I would *love* for the ColorContext to come across as I would be able to
create an ICC profile from memory, the way to do it.
It is perfect! Except, it does not work.
In all my testing, so far, I have NOT been able to retrieve a ColorContext
(embedded ICC profile) from a JPEG image.
Second question...
Where does the "StreamToArray" method comes from?
Best / Roger
 |