예제 #1
0
        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);
        }
예제 #2
0
 public static extern void CmsLCh2Lab(out ColorCIELab lab, ref ColorCIELCh lch);
예제 #3
0
 public static extern void CmsLab2XYZ(ref ColorCIEXYZ wp, out ColorCIEXYZ xyz, ref ColorCIELab lab);
예제 #4
0
 public static extern void CmsLab2LCh(out ColorCIELCh lch, ref ColorCIELab lab);
예제 #5
0
 public static extern void CmsXYZ2Lab(ref ColorCIEXYZ wp, out ColorCIELab lab, ref ColorCIEXYZ xyz);
예제 #6
0
		static extern void cmsLCh2Lab (out ColorCIELab lab, ref ColorCIELCh lch);
예제 #7
0
		static extern void cmsLab2XYZ (ref ColorCIEXYZ wp, out ColorCIEXYZ xyz, ref ColorCIELab lab);
예제 #8
0
		static extern void cmsLab2LCh (out ColorCIELCh lch, ref ColorCIELab lab);
예제 #9
0
		static extern void cmsXYZ2Lab (ref ColorCIEXYZ wp, out ColorCIELab lab, ref ColorCIEXYZ xyz);