private Cms.Profile AdjustmentProfile() { Cms.Profile profile; Cms.ColorCIEXYZ src_wp; Cms.ColorCIEXYZ dest_wp; double exposure = e; double brightness = b; double contrast = c; double hue = h; double saturation = s; if (UseWhiteSettings) { //src_wp = image_profile.MediaWhitePoint; src_wp = Cms.ColorCIExyY.WhitePointFromTemperature((int)t).ToXYZ(); dest_wp = Cms.ColorCIExyY.WhitePointFromTemperature((int)temp_scale.Value).ToXYZ(); Cms.ColorCIELab dest_lab = dest_wp.ToLab(src_wp); dest_lab.a += temptint_scale.Value; //System.Console.WriteLine ("after {0}", dest_lab); dest_wp = dest_lab.ToXYZ(src_wp); } else { src_wp = Cms.ColorCIExyY.WhitePointFromTemperature((int)t).ToXYZ(); dest_wp = src_wp; } if (UseExposureSettings) { exposure = exposure_scale.Value; brightness = brightness_scale.Value; contrast = contrast_scale.Value; hue = hue_scale.Value; saturation = sat_scale.Value; } profile = Cms.Profile.CreateAbstract(20, Math.Pow(Math.Sqrt(2.0), exposure), brightness, contrast, hue, saturation, null, src_wp.ToxyY(), dest_wp.ToxyY()); return(profile); }
public static extern void CmsLCh2Lab(out ColorCIELab lab, ref ColorCIELCh lch);
public static extern void CmsLab2XYZ(ref ColorCIEXYZ wp, out ColorCIEXYZ xyz, ref ColorCIELab lab);
public static extern void CmsLab2LCh(out ColorCIELCh lch, ref ColorCIELab lab);
public static extern void CmsXYZ2Lab(ref ColorCIEXYZ wp, out ColorCIELab lab, ref ColorCIEXYZ xyz);
static extern void cmsLCh2Lab (out ColorCIELab lab, ref ColorCIELCh lch);
static extern void cmsLab2XYZ (ref ColorCIEXYZ wp, out ColorCIEXYZ xyz, ref ColorCIELab lab);
static extern void cmsLab2LCh (out ColorCIELCh lch, ref ColorCIELab lab);
static extern void cmsXYZ2Lab (ref ColorCIEXYZ wp, out ColorCIELab lab, ref ColorCIEXYZ xyz);