> Does this code actually work for you?

Yes is does.
Perhaps I should have mentioned that you need at least .Net 4
In 3.5 it's available but does not work...
(s. 
https://social.msdn.microsoft.com/Forums/en-US/be7ad7d6-972f-4a39-ae90-55660d66c561/iccprofildaten-via-colorcontext?forum=wpfde)

The second thing that might cause some trouble: some jpeg (of digicams) 
do not really contain an icc profile, they are just tagged (in exif) to 
be SRGB or AdobeRGB. E.g. if exif:InteroperabilityIndex contains R03 
it's an AdobeRGB image, s 
http://regex.info/blog/photo-tech/color-spaces-page7
But! I just checked my AdobeRGB images taken with my Nikon or my Canon, 
and in every case ColorContext did work...

> Where does the "StreamToArray" method comes from?
The StreamToArray is a simple helper method (I forgot to cite) e.g.:
public static Byte[] StreamToArray(Stream input) {
    if (input is MemoryStream) {
       return (input as MemoryStream).ToArray();
    } else {
       using (MemoryStream ms = new MemoryStream()) {
          input.CopyTo(ms);
          return ms.ToArray();
       }
    }
}

Edgar








>
> 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...
>
>
> Best / Roger
>
>
> ------------------------------------------------------------------------------
> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.
> http://sdm.link/attshape
> _______________________________________________
> Lcms-user mailing list
> Lcms-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lcms-user
>

-- 
lakeBits Inh. Edgar Loser
Haydnstr. 25
78464 Konstanz
Tel 0049 7531 5844154 0
Fax 0049 7531 5844154 9
http://www.colymp.com/
mailto:lo...@colymp.com

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to