update images

This commit is contained in:
Luke Pulverenti
2017-05-09 16:18:02 -04:00
parent 34c3783f42
commit 4569b6b491
3 changed files with 25 additions and 0 deletions

View File

@@ -95,6 +95,8 @@ namespace Emby.Drawing.Skia
{
// @todo
}
_fileSystem.CopyFile(inputPath, outputPath, true);
}
public ImageSize GetImageSize(string path)
@@ -118,6 +120,15 @@ namespace Emby.Drawing.Skia
public void EncodeImage(string inputPath, string outputPath, bool autoOrient, int width, int height, int quality, ImageProcessingOptions options, ImageFormat selectedOutputFormat)
{
if (string.IsNullOrWhiteSpace(inputPath))
{
throw new ArgumentNullException("inputPath");
}
if (string.IsNullOrWhiteSpace(inputPath))
{
throw new ArgumentNullException("outputPath");
}
using (var bitmap = SKBitmap.Decode(inputPath))
{
using (var resizedBitmap = new SKBitmap(width, height, bitmap.ColorType, bitmap.AlphaType))