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 )); } }
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 );
internal static extern LCMSTransformHandleX64 CreateProofingTransformBGRA8( LCMSProfileHandle input, LCMSProfileHandle display, RenderingIntent displayIntent, LCMSProfileHandle proofing, RenderingIntent proofingIntent, LCMSEnums.TransformFlags flags );
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)); } }
internal static void SetProfileRenderingIntent(LCMSProfileHandle hProfile, RenderingIntent newRenderingIntent) { if (IntPtr.Size == 8) { LCMS_64.SetProfileRenderingIntent(hProfile, newRenderingIntent); } else { LCMS_86.SetProfileRenderingIntent(hProfile, newRenderingIntent); } }
internal static RenderingIntent GetProfileRenderingIntent(LCMSProfileHandle hProfile) { if (IntPtr.Size == 8) { return(LCMS_64.GetProfileRenderingIntent(hProfile)); } else { return(LCMS_86.GetProfileRenderingIntent(hProfile)); } }
internal static ProfileColorSpace GetProfileColorSpace(LCMSProfileHandle hProfile) { if (IntPtr.Size == 8) { return(LCMS_64.GetProfileColorSpace(hProfile)); } else { return(LCMS_86.GetProfileColorSpace(hProfile)); } }
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)); } }
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 )); } }
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); }
internal static extern void SetProfileRenderingIntent(LCMSProfileHandle hProfile, RenderingIntent intent);
internal static extern RenderingIntent GetProfileRenderingIntent(LCMSProfileHandle hProfile);
internal static extern ProfileColorSpace GetProfileColorSpace(LCMSProfileHandle hProfile);
internal static extern uint GetColorProfileInfo( LCMSProfileHandle hProfile, LCMSEnums.ProfileInfoType infoType, [Out()] StringBuilder buffer, uint bufferSize );
internal static extern uint GetColorProfileInfoSize(LCMSProfileHandle hProfile, LCMSEnums.ProfileInfoType infoType);
internal static extern bool SaveColorProfileToFile(LCMSProfileHandle hProfile, [MarshalAs(UnmanagedType.LPWStr)] string fileName);