Exemple #1
0
 /// <summary>
 /// Converts the PCS color into the device color
 /// </summary>
 /// <param name="Profile">The profile that will be used for the conversion</param>
 /// <param name="pcs">The PCS color (has to match the profiles PCS color type)</param>
 /// <param name="PrefRenderingIntent">The preferred rendering intent</param>
 /// <param name="ConversionMethod">The method of conversion</param>
 /// <param name="ConversionType">The type of conversion</param>
 /// <returns>The converted color in the device color type</returns>
 public Color ToDevice(ICC Profile, Color pcs, RenderingIntent PrefRenderingIntent, ICCconversionMethod ConversionMethod, ICCconversionType ConversionType)
 {
     InValues                 = pcs.ColorArray;
     InModel                  = pcs.Model;
     this.Profile             = Profile;
     PreferredRenderingIntent = PrefRenderingIntent;
     this.ConversionMethod    = ConversionMethod;
     this.ConversionType      = ConversionType;
     IsDefault                = false;
     return(Do_PCS());
 }
Exemple #2
0
 /// <summary>
 /// Converts the device color into the PCS color
 /// </summary>
 /// <param name="Profile">The profile that will be used for the conversion</param>
 /// <param name="inColor">The device color (has to match the profiles device color type)</param>
 /// <param name="ConversionMethod">The method of conversion</param>
 /// <param name="ConversionType">The type of conversion</param>
 /// <returns>The converted color in the PCS color type</returns>
 public Color ToPCS(ICC Profile, Color inColor, ICCconversionMethod ConversionMethod, ICCconversionType ConversionType)
 {
     InValues                 = inColor.ColorArray;
     InModel                  = inColor.Model;
     this.Profile             = Profile;
     PreferredRenderingIntent = ColorConverter.PreferredRenderingIntent;
     this.ConversionMethod    = ConversionMethod;
     this.ConversionType      = ConversionType;
     IsDefault                = false;
     return(Do_Device());
 }
 /// <summary>
 /// Converts the device color into the PCS color
 /// </summary>
 /// <param name="Profile">The profile that will be used for the conversion</param>
 /// <param name="inColor">The device color (has to match the profiles device color type)</param>
 /// <param name="PrefRenderingIntent">The preferred rendering intent</param>
 /// <param name="ConversionMethod">The method of conversion</param>
 /// <param name="ConversionType">The type of conversion</param>
 /// <returns>The converted color in the PCS color type</returns>
 public Color ToPCS(ICC Profile, Color inColor, RenderingIntent PrefRenderingIntent, ICCconversionMethod ConversionMethod, ICCconversionType ConversionType)
 {
     InValues = inColor.ColorArray;
     InModel = inColor.Model;
     this.Profile = Profile;
     PreferredRenderingIntent = PrefRenderingIntent;
     this.ConversionMethod = ConversionMethod;
     this.ConversionType = ConversionType;
     IsDefault = false;
     return Do_Device();
 }
 /// <summary>
 /// Converts the PCS color into the device color
 /// </summary>
 /// <param name="Profile">The profile that will be used for the conversion</param>
 /// <param name="pcs">The PCS color (has to match the profiles PCS color type)</param>
 /// <param name="ConversionMethod">The method of conversion</param>
 /// <param name="ConversionType">The type of conversion</param>
 /// <returns>The converted color in the device color type</returns>
 public Color ToDevice(ICC Profile, Color pcs, ICCconversionMethod ConversionMethod, ICCconversionType ConversionType)
 {
     InValues = pcs.ColorArray;
     InModel = pcs.Model;
     this.Profile = Profile;
     PreferredRenderingIntent = ColorConverter.PreferredRenderingIntent;
     this.ConversionMethod = ConversionMethod;
     this.ConversionType = ConversionType;
     IsDefault = false;
     return Do_PCS();
 }
 /// <summary>
 /// Converts a color to the ICC color
 /// </summary>
 /// <param name="InColor">The color to convert</param>
 /// <param name="profile">The icc file to be used for the conversion</param>
 /// <param name="ConversionType">The type of conversion</param>
 /// <param name="ConversionMethod">The method of conversion</param>
 /// <param name="PrefRenderingIntent">The preferred rendering intent</param>
 /// <returns>The converted color</returns>
 public Color ToICC(Color InColor, ICC profile, RenderingIntent PrefRenderingIntent, ICCconversionType ConversionType, ICCconversionMethod ConversionMethod)
 {
     if (ICC_Converter.IsSameSpace(InColor.Model, profile.Header.DataColorspace)) { return ICCconverter.ToPCS(profile, InColor, PrefRenderingIntent, ConversionMethod, ConversionType); }
     else if (ICC_Converter.IsSameSpace(InColor.Model, profile.Header.PCS)) { return ICCconverter.ToDevice(profile, InColor, PrefRenderingIntent, ConversionMethod, ConversionType); }
     else { return ToICC(ToICC_PCS(InColor, profile), profile, PrefRenderingIntent, ConversionType, ConversionMethod); }
 }