/// <summary> /// Initializes ImageMagick with the specified configuration files in the specified the path. /// </summary> /// <param name="configFiles">The configuration files ot initialize ImageMagick with.</param> /// <param name="path">The directory to save the configuration files in.</param> public static void Initialize(ConfigurationFiles configFiles, string path) { Throw.IfNull(nameof(configFiles), configFiles); string newPath = FileHelper.GetFullPath(path); InitializePrivate(configFiles, newPath); }
/// <summary> /// Initializes ImageMagick with the xml files that are located in the specified path. /// </summary> /// <param name="path">The path that contains the ImageMagick xml files.</param> public static void Initialize(string path) { string newPath = FileHelper.GetFullPath(path); CheckImageMagickFiles(newPath); Environment.SetEnv("MAGICK_CONFIGURE_PATH", path); }
/// <summary> /// Sets the directory that contains the Native library. This currently only works on Windows. /// </summary> /// <param name="path">The path of the directory that contains the native library.</param> public static void SetNativeLibraryDirectory(string path) { #if NETSTANDARD if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { NativeWindowsMethods.SetDllDirectory(FileHelper.GetFullPath(path)); } #else NativeWindowsMethods.SetDllDirectory(FileHelper.GetFullPath(path)); #endif }
/// <summary> /// Sets the directory that will be used when ImageMagick does not have enough memory for the /// pixel cache. /// </summary> /// <param name="path">The path where temp files will be written.</param> public static void SetTempDirectory(string path) => Environment.SetEnv("MAGICK_TEMPORARY_PATH", FileHelper.GetFullPath(path));
/// <summary> /// Sets the directory that contains the Ghostscript font files. /// </summary> /// <param name="path">The path of the Ghostscript font directory.</param> public static void SetGhostscriptFontDirectory(string path) => Environment.SetEnv("MAGICK_GHOSTSCRIPT_FONT_PATH", FileHelper.GetFullPath(path));
///<summary> /// Sets the directory that will be used by ImageMagick to store OpenCL cache files. ///</summary> ///<param name="path">The path of the OpenCL cache directory.</param> public static void SetCacheDirectory(string path) { Environment.SetEnv("MAGICK_OPENCL_CACHE_DIR", FileHelper.GetFullPath(path)); }
/// <summary> /// Sets the directory that contains the FontConfig configuration files. /// </summary> /// <param name="path">The path of the FontConfig directory.</param> public static void SetFontConfigDirectory(string path) => Environment.SetEnv("FONTCONFIG_PATH", FileHelper.GetFullPath(path));
/// <summary> /// Sets the directory that contains the Native library. /// </summary> /// <param name="path">The path of the directory that contains the native library.</param> public static void SetNativeLibraryDirectory(string path) => NativeWindowsMethods.SetDllDirectory(FileHelper.GetFullPath(path));