aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Emby.Drawing/ImageProcessor.cs10
-rw-r--r--Emby.Photos/PhotoProvider.cs2
-rw-r--r--Emby.Server.Implementations/Dto/DtoService.cs2
-rw-r--r--MediaBrowser.Api/Images/ImageService.cs2
-rw-r--r--MediaBrowser.Controller/Drawing/IImageProcessor.cs23
-rw-r--r--MediaBrowser.Model/Drawing/ImageDimensions.cs (renamed from MediaBrowser.Model/Drawing/ImageSize.cs)2
6 files changed, 27 insertions, 14 deletions
diff --git a/Emby.Drawing/ImageProcessor.cs b/Emby.Drawing/ImageProcessor.cs
index 097b4c40b..2446c3953 100644
--- a/Emby.Drawing/ImageProcessor.cs
+++ b/Emby.Drawing/ImageProcessor.cs
@@ -368,10 +368,10 @@ namespace Emby.Drawing
return GetCachePath(ResizedImageCachePath, filename, "." + format.ToString().ToLowerInvariant());
}
- public ImageDimensions GetImageSize(BaseItem item, ItemImageInfo info)
- => GetImageSize(item, info, true);
+ public ImageDimensions GetImageDimensions(BaseItem item, ItemImageInfo info)
+ => GetImageDimensions(item, info, true);
- public ImageDimensions GetImageSize(BaseItem item, ItemImageInfo info, bool updateItem)
+ public ImageDimensions GetImageDimensions(BaseItem item, ItemImageInfo info, bool updateItem)
{
int width = info.Width;
int height = info.Height;
@@ -384,7 +384,7 @@ namespace Emby.Drawing
string path = info.Path;
_logger.LogInformation("Getting image size for item {ItemType} {Path}", item.GetType().Name, path);
- ImageDimensions size = GetImageSize(path);
+ ImageDimensions size = GetImageDimensions(path);
info.Width = size.Width;
info.Height = size.Height;
@@ -399,7 +399,7 @@ namespace Emby.Drawing
/// <summary>
/// Gets the size of the image.
/// </summary>
- public ImageDimensions GetImageSize(string path)
+ public ImageDimensions GetImageDimensions(string path)
=> _imageEncoder.GetImageSize(path);
/// <summary>
diff --git a/Emby.Photos/PhotoProvider.cs b/Emby.Photos/PhotoProvider.cs
index aaebe1a21..f3457d105 100644
--- a/Emby.Photos/PhotoProvider.cs
+++ b/Emby.Photos/PhotoProvider.cs
@@ -181,7 +181,7 @@ namespace Emby.Photos
try
{
- var size = _imageProcessor.GetImageSize(item, img, false);
+ var size = _imageProcessor.GetImageDimensions(item, img, false);
if (size.Width > 0 && size.Height > 0)
{
diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs
index f5634690f..983eb51e6 100644
--- a/Emby.Server.Implementations/Dto/DtoService.cs
+++ b/Emby.Server.Implementations/Dto/DtoService.cs
@@ -1418,7 +1418,7 @@ namespace Emby.Server.Implementations.Dto
try
{
- size = _imageProcessor.GetImageSize(item, imageInfo);
+ size = _imageProcessor.GetImageDimensions(item, imageInfo);
if (size.Width <= 0 || size.Height <= 0)
{
diff --git a/MediaBrowser.Api/Images/ImageService.cs b/MediaBrowser.Api/Images/ImageService.cs
index b5e23476e..61db7b8d4 100644
--- a/MediaBrowser.Api/Images/ImageService.cs
+++ b/MediaBrowser.Api/Images/ImageService.cs
@@ -324,7 +324,7 @@ namespace MediaBrowser.Api.Images
var fileInfo = _fileSystem.GetFileInfo(info.Path);
length = fileInfo.Length;
- ImageDimensions size = _imageProcessor.GetImageSize(item, info, true);
+ ImageDimensions size = _imageProcessor.GetImageDimensions(item, info, true);
width = size.Width;
height = size.Height;
diff --git a/MediaBrowser.Controller/Drawing/IImageProcessor.cs b/MediaBrowser.Controller/Drawing/IImageProcessor.cs
index 783182730..957be3cf8 100644
--- a/MediaBrowser.Controller/Drawing/IImageProcessor.cs
+++ b/MediaBrowser.Controller/Drawing/IImageProcessor.cs
@@ -26,16 +26,29 @@ namespace MediaBrowser.Controller.Drawing
/// <value>The image enhancers.</value>
IImageEnhancer[] ImageEnhancers { get; }
- ImageDimensions GetImageSize(string path);
+ /// <summary>
+ /// Gets the dimensions of the image.
+ /// </summary>
+ /// <param name="path">Path to the image file.</param>
+ /// <returns>ImageDimensions</returns>
+ ImageDimensions GetImageDimensions(string path);
/// <summary>
- /// Gets the size of the image.
+ /// Gets the dimensions of the image.
/// </summary>
+ /// <param name="item">The base item.</param>
/// <param name="info">The information.</param>
- /// <returns>ImageSize.</returns>
- ImageDimensions GetImageSize(BaseItem item, ItemImageInfo info);
+ /// <returns>ImageDimensions</returns>
+ ImageDimensions GetImageDimensions(BaseItem item, ItemImageInfo info);
- ImageDimensions GetImageSize(BaseItem item, ItemImageInfo info, bool updateItem);
+ /// <summary>
+ /// Gets the dimensions of the image.
+ /// </summary>
+ /// <param name="item">The base item.</param>
+ /// <param name="info">The information.</param>
+ /// <param name="updateItem">Whether or not the item info should be updated.</param>
+ /// <returns>ImageDimensions</returns>
+ ImageDimensions GetImageDimensions(BaseItem item, ItemImageInfo info, bool updateItem);
/// <summary>
/// Adds the parts.
diff --git a/MediaBrowser.Model/Drawing/ImageSize.cs b/MediaBrowser.Model/Drawing/ImageDimensions.cs
index 75591d83d..e7805ac49 100644
--- a/MediaBrowser.Model/Drawing/ImageSize.cs
+++ b/MediaBrowser.Model/Drawing/ImageDimensions.cs
@@ -1,7 +1,7 @@
namespace MediaBrowser.Model.Drawing
{
/// <summary>
- /// Struct ImageSize
+ /// Struct ImageDimensions
/// </summary>
public struct ImageDimensions
{