private static void ExtractLibrary()
        {
            var name           = NativeLibrary.Name + "-" + NativeLibrary.QuantumName + "-" + NativeLibrary.PlatformName;
            var cacheDirectory = CreateCacheDirectory();
            var tempFile       = Path.Combine(cacheDirectory, name + ".dll");

            WriteAssembly(tempFile);

            MagickNET.SetNativeLibraryDirectory(cacheDirectory);

            MagickNET.Initialize(ConfigurationFiles.Default, cacheDirectory);
        }
Exemplo n.º 2
0
        private static void ExtractLibrary()
        {
#if Q8
            string name = "Magick.NET-Q8-" + (NativeLibrary.Is64Bit ? "x64" : "x86");
#elif Q16
            string name = "Magick.NET-Q16-" + (NativeLibrary.Is64Bit ? "x64" : "x86");
#elif Q16HDRI
            string name = "Magick.NET-Q16-HDRI-" + (NativeLibrary.Is64Bit ? "x64" : "x86");
#else
#error Not implemented!
#endif
            string cacheDirectory = CreateCacheDirectory();
            string tempFile       = Path.Combine(cacheDirectory, name + ".Native.dll");

            WriteAssembly(tempFile);

            MagickNET.SetNativeLibraryDirectory(cacheDirectory);

            MagickNET.Initialize(ConfigurationFiles.Default, cacheDirectory);
        }