aboutsummaryrefslogtreecommitdiff
path: root/Emby.Drawing.Skia
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Drawing.Skia')
-rw-r--r--Emby.Drawing.Skia/Properties/AssemblyInfo.cs20
-rw-r--r--Emby.Drawing.Skia/SkiaEncoder.cs10
-rw-r--r--Emby.Drawing.Skia/StripCollageBuilder.cs7
3 files changed, 19 insertions, 18 deletions
diff --git a/Emby.Drawing.Skia/Properties/AssemblyInfo.cs b/Emby.Drawing.Skia/Properties/AssemblyInfo.cs
index b8799f986..521010cdb 100644
--- a/Emby.Drawing.Skia/Properties/AssemblyInfo.cs
+++ b/Emby.Drawing.Skia/Properties/AssemblyInfo.cs
@@ -1,6 +1,5 @@
-using System.Resources;
using System.Reflection;
-using System.Runtime.CompilerServices;
+using System.Resources;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
@@ -9,17 +8,14 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Emby.Drawing.Skia")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Emby.Drawing.Skia")]
-[assembly: AssemblyCopyright("Copyright © 2017")]
+[assembly: AssemblyCompany("Jellyfin Project")]
+[assembly: AssemblyProduct("Jellyfin: The Free Software Media System")]
+[assembly: AssemblyCopyright("Copyright © 2019 Jellyfin Contributors. Code released under the GNU General Public License Version 2")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: NeutralResourcesLanguage("en")]
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-// \ No newline at end of file
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
diff --git a/Emby.Drawing.Skia/SkiaEncoder.cs b/Emby.Drawing.Skia/SkiaEncoder.cs
index 0467794dc..dc5ae77cc 100644
--- a/Emby.Drawing.Skia/SkiaEncoder.cs
+++ b/Emby.Drawing.Skia/SkiaEncoder.cs
@@ -197,7 +197,7 @@ namespace Emby.Drawing.Skia
private static bool HasDiacritics(string text)
{
- return !String.Equals(text, text.RemoveDiacritics(), StringComparison.Ordinal);
+ return !string.Equals(text, text.RemoveDiacritics(), StringComparison.Ordinal);
}
private static bool RequiresSpecialCharacterHack(string path)
@@ -509,11 +509,11 @@ namespace Emby.Drawing.Skia
{
if (string.IsNullOrWhiteSpace(inputPath))
{
- throw new ArgumentNullException("inputPath");
+ throw new ArgumentNullException(nameof(inputPath));
}
if (string.IsNullOrWhiteSpace(inputPath))
{
- throw new ArgumentNullException("outputPath");
+ throw new ArgumentNullException(nameof(outputPath));
}
var skiaOutputFormat = GetImageFormat(selectedOutputFormat);
@@ -594,12 +594,12 @@ namespace Emby.Drawing.Skia
// If foreground layer present then draw
if (hasForegroundColor)
{
- if (!Double.TryParse(options.ForegroundLayer, out double opacity))
+ if (!double.TryParse(options.ForegroundLayer, out double opacity))
{
opacity = .4;
}
- canvas.DrawColor(new SKColor(0, 0, 0, (Byte)((1 - opacity) * 0xFF)), SKBlendMode.SrcOver);
+ canvas.DrawColor(new SKColor(0, 0, 0, (byte)((1 - opacity) * 0xFF)), SKBlendMode.SrcOver);
}
if (hasIndicator)
diff --git a/Emby.Drawing.Skia/StripCollageBuilder.cs b/Emby.Drawing.Skia/StripCollageBuilder.cs
index a98450e08..b3e7dbb5f 100644
--- a/Emby.Drawing.Skia/StripCollageBuilder.cs
+++ b/Emby.Drawing.Skia/StripCollageBuilder.cs
@@ -1,4 +1,4 @@
-using SkiaSharp;
+using SkiaSharp;
using MediaBrowser.Common.Configuration;
using System;
using System.IO;
@@ -20,6 +20,11 @@ namespace Emby.Drawing.Skia
public static SKEncodedImageFormat GetEncodedFormat(string outputPath)
{
+ if (outputPath == null)
+ {
+ throw new ArgumentNullException(nameof(outputPath));
+ }
+
var ext = Path.GetExtension(outputPath).ToLower();
if (ext == ".jpg" || ext == ".jpeg")