Marti suggested to use the cmsReadTad and cmsWriteTag -- good idea!

This is proving a little difficult, however, in C#, given my humble level of
system programming.

So far, I have declared the call this way:

[DllImport(@lcms2Path)]
public static extern IntPtr cmsReadTag(IntPtr hProfile, uint
cmsTagSignature);

(Table 21 does not specify the type of cmsTagSignature so I am inferring
Unsigned Integer, 32bits, type)

Then, in my code, I call the function this way:

IntPtr Pointer = IntPtr.Zero;
Pointer = cmsReadTag (hDestination, 0x77747074);    // 0x77747074 =
MediaWhitePointTag

            
I have not run that code YET but I assume it will run fine, up to this
point, which is where I have to access the memory area pointed to by
"Pointer"?

My CIEXYZ structure, to hold the data, is declared this way:

public struct MyCIEXYZ
        {
            public double X;   // cmsFloat64Number, 
            public double Y;   // MS says double type = 64bit double
precision IEEE 754 format ?
            public double Z;  // is it OK to use double?
        }

Then, I create an instance of myCIEXYZ this way, after receiving the Pointer
from cmsReadTag:

            MyCIEXYZ MediaWhitePoint;


The problem is that, beyond this point, I have no idea how to access the
parsed data using the returned Pointer in C#?
It gets complicated. There is the business of "declaring" UnsafeCode and,
possibly, "pinning" area of memory.

I would appreciate some guidance, if possible.

Keep in mind that, later, I am going to have to find a way to send my
modified CIE XYZ data *to* the profile, through the cmsWrite() function!
This is going to be interesting...

I will continue my research on my own but, in the meantime, any help is
appreciated.

/ Roger Breton





------------------------------

just use cmsReadTag and cmsWriteTag. 

Please note white point only affects absolute colorimetric intent.

Regards

Marti


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to