aboutsummaryrefslogtreecommitdiff
path: root/Emby.Drawing.Skia
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-05-09 16:18:02 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-05-09 16:18:02 -0400
commit4569b6b49196eeb0c13003bfce087e2258dcc33e (patch)
tree4a923bc5f13d6193a2a12b9c682d6ae0e95062d4 /Emby.Drawing.Skia
parent34c3783f42d643f2dcc2e93d8f0b5e07580c21c1 (diff)
update images
Diffstat (limited to 'Emby.Drawing.Skia')
-rw-r--r--Emby.Drawing.Skia/SkiaEncoder.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/Emby.Drawing.Skia/SkiaEncoder.cs b/Emby.Drawing.Skia/SkiaEncoder.cs
index 2c2ae03b6..3c631aef0 100644
--- a/Emby.Drawing.Skia/SkiaEncoder.cs
+++ b/Emby.Drawing.Skia/SkiaEncoder.cs
@@ -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))