Re: [Lcms-user] Lcms-user Digest, Vol 109, Issue 10
An ICC-based CMM for color management
Brought to you by:
mm2
|
From: Roger B. <gr...@vi...> - 2016-06-30 14:57:11
|
Edgar,
Thank YOU so much!!!!
One question...
In the following code :
public static class NativeMethods {
[DllImport("lcms2.dll")]
public static extern void cmsDoTransform(
[In] IntPtr Transform,
[In] byte[] InputBuffer,
[Out] byte[] OutputBuffer,
[In] UInt32 Size);
}
Why (warum) do you pass a pointer to a byte array (byte[])?
(I understand image pixel data = bytes)
I am no C# specialist BUT that makes the function "less universal" than if
you were to pass a straight, basic 'IntPtr'?
The reason I ask is, are you not limited to the type of data you can pass
cmsDoTransform then?
In my original pinvoke declaration, I use pointers to 'double[]' arrays :
this will not work (arbeit) with your 'byte[]' declaration anymore?
I was thinking of, perhaps, the solution is create a second class to host
your cmsDoTransform function call and continue using my first cmsDoTransform
to process individual 'double[]' data type.
Is that what you do?
MfG / Kindest regards,
/ Roger Breton
|