예제 #1
0
 internal static LCMSEnums.ConvertProfileStatus ConvertToProfile(
     LCMSProfileHandle inputProfile,
     LCMSProfileHandle outputProfile,
     RenderingIntent renderingIntent,
     LCMSEnums.TransformFlags flags,
     ref LCMSStructs.BitmapData input,
     ref LCMSStructs.BitmapData output
     )
 {
     if (IntPtr.Size == 8)
     {
         return(LCMS_64.ConvertToProfile(
                    inputProfile,
                    outputProfile,
                    renderingIntent,
                    flags,
                    ref input,
                    ref output
                    ));
     }
     else
     {
         return(LCMS_86.ConvertToProfile(
                    inputProfile,
                    outputProfile,
                    renderingIntent,
                    flags,
                    ref input,
                    ref output
                    ));
     }
 }
예제 #2
0
 internal static extern LCMSEnums.ConvertProfileStatus ConvertToProfile(
     LCMSProfileHandle inputProfile,
     LCMSProfileHandle outputProfile,
     RenderingIntent renderingIntent,
     LCMSEnums.TransformFlags flags,
     [In()] ref LCMSStructs.BitmapData input,
     [In()] ref LCMSStructs.BitmapData output
     );
예제 #3
0
 internal static extern LCMSTransformHandleX64 CreateProofingTransformBGRA8(
     LCMSProfileHandle input,
     LCMSProfileHandle display,
     RenderingIntent displayIntent,
     LCMSProfileHandle proofing,
     RenderingIntent proofingIntent,
     LCMSEnums.TransformFlags flags
     );
예제 #4
0
 internal static bool SaveColorProfile(LCMSProfileHandle hProfile, string fileName)
 {
     if (IntPtr.Size == 8)
     {
         return(LCMS_64.SaveColorProfileToFile(hProfile, fileName));
     }
     else
     {
         return(LCMS_86.SaveColorProfileToFile(hProfile, fileName));
     }
 }
예제 #5
0
 internal static void SetProfileRenderingIntent(LCMSProfileHandle hProfile, RenderingIntent newRenderingIntent)
 {
     if (IntPtr.Size == 8)
     {
         LCMS_64.SetProfileRenderingIntent(hProfile, newRenderingIntent);
     }
     else
     {
         LCMS_86.SetProfileRenderingIntent(hProfile, newRenderingIntent);
     }
 }
예제 #6
0
 internal static RenderingIntent GetProfileRenderingIntent(LCMSProfileHandle hProfile)
 {
     if (IntPtr.Size == 8)
     {
         return(LCMS_64.GetProfileRenderingIntent(hProfile));
     }
     else
     {
         return(LCMS_86.GetProfileRenderingIntent(hProfile));
     }
 }
예제 #7
0
 internal static ProfileColorSpace GetProfileColorSpace(LCMSProfileHandle hProfile)
 {
     if (IntPtr.Size == 8)
     {
         return(LCMS_64.GetProfileColorSpace(hProfile));
     }
     else
     {
         return(LCMS_86.GetProfileColorSpace(hProfile));
     }
 }
예제 #8
0
 internal static uint GetProfileInfoSize(LCMSProfileHandle hProfile, LCMSEnums.ProfileInfoType infoType)
 {
     if (IntPtr.Size == 8)
     {
         return(LCMS_64.GetColorProfileInfoSize(hProfile, infoType));
     }
     else
     {
         return(LCMS_86.GetColorProfileInfoSize(hProfile, infoType));
     }
 }
예제 #9
0
        internal static LCMSTransformHandle CreateProofingTransformBGRA8(
            LCMSProfileHandle input,
            LCMSProfileHandle display,
            RenderingIntent displayIntent,
            LCMSProfileHandle proofing,
            RenderingIntent proofingIntent,
            bool checkGamut,
            Color gamutWarningColor,
            bool blackPointCompensation
            )
        {
            LCMSEnums.TransformFlags flags = LCMSEnums.TransformFlags.None;

            if (checkGamut)
            {
                flags |= LCMSEnums.TransformFlags.GamutCheck;
                SetGamutWarningColor(gamutWarningColor);
            }
            else
            {
                flags |= LCMSEnums.TransformFlags.SoftProofing;
            }

            if (UseBlackPointCompensation(blackPointCompensation, proofingIntent))
            {
                flags |= LCMSEnums.TransformFlags.BlackPointCompensation;
            }

            if (IntPtr.Size == 8)
            {
                return(LCMS_64.CreateProofingTransformBGRA8(
                           input,
                           display,
                           displayIntent,
                           proofing,
                           proofingIntent,
                           flags
                           ));
            }
            else
            {
                return(LCMS_86.CreateProofingTransformBGRA8(
                           input,
                           display,
                           displayIntent,
                           proofing,
                           proofingIntent,
                           flags
                           ));
            }
        }
예제 #10
0
        internal static string GetProfileInfo(LCMSProfileHandle hProfile, LCMSEnums.ProfileInfoType infoType, uint bufferSize)
        {
            if (bufferSize > 0U)
            {
                uint          result;
                StringBuilder buffer = new StringBuilder((int)bufferSize);

                if (IntPtr.Size == 8)
                {
                    result = LCMS_64.GetColorProfileInfo(hProfile, infoType, buffer, bufferSize);
                }
                else
                {
                    result = LCMS_86.GetColorProfileInfo(hProfile, infoType, buffer, bufferSize);
                }

                if (result > 0U)
                {
                    return(buffer.ToString());
                }
            }

            return(string.Empty);
        }
예제 #11
0
 internal static extern void SetProfileRenderingIntent(LCMSProfileHandle hProfile, RenderingIntent intent);
예제 #12
0
 internal static extern RenderingIntent GetProfileRenderingIntent(LCMSProfileHandle hProfile);
예제 #13
0
 internal static extern ProfileColorSpace GetProfileColorSpace(LCMSProfileHandle hProfile);
예제 #14
0
 internal static extern uint GetColorProfileInfo(
     LCMSProfileHandle hProfile,
     LCMSEnums.ProfileInfoType infoType,
     [Out()] StringBuilder buffer,
     uint bufferSize
     );
예제 #15
0
 internal static extern uint GetColorProfileInfoSize(LCMSProfileHandle hProfile, LCMSEnums.ProfileInfoType infoType);
예제 #16
0
 internal static extern bool SaveColorProfileToFile(LCMSProfileHandle hProfile, [MarshalAs(UnmanagedType.LPWStr)] string fileName);