aboutsummaryrefslogtreecommitdiff
path: root/Emby.Drawing/ImageProcessor.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Drawing/ImageProcessor.cs')
-rw-r--r--Emby.Drawing/ImageProcessor.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Emby.Drawing/ImageProcessor.cs b/Emby.Drawing/ImageProcessor.cs
index 8ac2b9b27..f229d9a0b 100644
--- a/Emby.Drawing/ImageProcessor.cs
+++ b/Emby.Drawing/ImageProcessor.cs
@@ -144,7 +144,7 @@ namespace Emby.Drawing
private static readonly string[] TransparentImageTypes = new string[] { ".png", ".webp", ".gif" };
public bool SupportsTransparency(string path)
- => TransparentImageTypes.Contains(Path.GetExtension(path).ToLower());
+ => TransparentImageTypes.Contains(Path.GetExtension(path).ToLowerInvariant());
public async Task<(string path, string mimeType, DateTime dateModified)> ProcessImage(ImageProcessingOptions options)
{
@@ -244,7 +244,7 @@ namespace Emby.Drawing
try
{
- if (!_fileSystem.FileExists(cacheFilePath))
+ if (!File.Exists(cacheFilePath))
{
if (options.CropWhiteSpace && !SupportsTransparency(originalImagePath))
{
@@ -374,7 +374,7 @@ namespace Emby.Drawing
filename += "v=" + Version;
- return GetCachePath(ResizedImageCachePath, filename, "." + format.ToString().ToLower());
+ return GetCachePath(ResizedImageCachePath, filename, "." + format.ToString().ToLowerInvariant());
}
public ImageDimensions GetImageSize(BaseItem item, ItemImageInfo info)
@@ -626,12 +626,12 @@ namespace Emby.Drawing
try
{
// Check again in case of contention
- if (_fileSystem.FileExists(enhancedImagePath))
+ if (File.Exists(enhancedImagePath))
{
return (enhancedImagePath, treatmentRequiresTransparency);
}
- _fileSystem.CreateDirectory(_fileSystem.GetDirectoryName(enhancedImagePath));
+ Directory.CreateDirectory(Path.GetDirectoryName(enhancedImagePath));
await ExecuteImageEnhancers(supportedEnhancers, originalImagePath, enhancedImagePath, item, imageType, imageIndex).ConfigureAwait(false);