support running in windows as 64-bit process

This commit is contained in:
Luke Pulverenti
2016-01-12 14:28:29 -05:00
parent 75bbaf2646
commit a5a8fe3f02
8 changed files with 851 additions and 113 deletions

View File

@@ -72,11 +72,16 @@ namespace Emby.Drawing.ImageMagick
private void LogVersion()
{
_logger.Info("ImageMagick version: " + Wand.VersionString);
_logger.Info("ImageMagick version: " + GetVersion());
TestWebp();
Wand.SetMagickThreadCount(1);
}
public static string GetVersion()
{
return Wand.VersionString;
}
private bool _webpAvailable = true;
private void TestWebp()
{
@@ -148,7 +153,7 @@ namespace Emby.Drawing.ImageMagick
DrawIndicator(originalImage, width, height, options);
originalImage.CurrentImage.CompressionQuality = quality;
//originalImage.CurrentImage.StripImage();
originalImage.CurrentImage.StripImage();
originalImage.SaveImage(outputPath);
}
@@ -165,7 +170,7 @@ namespace Emby.Drawing.ImageMagick
DrawIndicator(wand, width, height, options);
wand.CurrentImage.CompressionQuality = quality;
//wand.CurrentImage.StripImage();
wand.CurrentImage.StripImage();
wand.SaveImage(outputPath);
}
@@ -176,15 +181,16 @@ namespace Emby.Drawing.ImageMagick
private void ScaleImage(MagickWand wand, int width, int height)
{
wand.CurrentImage.ResizeImage(width, height);
//if (_config.Configuration.EnableHighQualityImageScaling)
//{
// wand.CurrentImage.ResizeImage(width, height);
//}
//else
//{
// wand.CurrentImage.ScaleImage(width, height);
//}
var highQuality = false;
if (highQuality)
{
wand.CurrentImage.ResizeImage(width, height);
}
else
{
wand.CurrentImage.ScaleImage(width, height);
}
}
/// <summary>