Beispiel #1
0
 /// <summary>
 /// Creates a new ColorProfileViewModel from a given name, but only
 /// if the color profile's color space is known by the view model.
 /// Directory and file extension will be appended automatically.
 /// Note that the lcms2.dll must have been loaded prior to calling
 /// this method!
 /// </summary>
 /// <param name="fileName">Full file name of the ICS color profile.</param>
 /// <returns>Instance of ColorProfileViewModel, or null if the color
 /// profile has an unknown color space.</returns>
 public static ColorProfileViewModel CreateFromName(string name)
 {
     return(CreateFromFile(
                System.IO.Path.Combine(
                    Pinvoke.GetColorDirectory(),
                    name + Lcms.Constants.COLOR_PROFILE_EXTENSION
                    )
                ));
 }
Beispiel #2
0
 /// <summary>
 /// Returns a complete path for the color profile.
 /// </summary>
 /// <returns>Complete path to the color profile file.</returns>
 private string GetPathFromName()
 {
     return(System.IO.Path.Combine(
                Pinvoke.GetColorDirectory(),
                Name + Lcms.Constants.COLOR_PROFILE_EXTENSION));
 }