aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Drawing.Skia
diff options
context:
space:
mode:
authordkanada <dkanada@users.noreply.github.com>2019-03-09 11:17:02 +0900
committerdkanada <dkanada@users.noreply.github.com>2019-03-09 11:17:02 +0900
commit47095e6cf87d73aad2abf2f9f326631cf95704fa (patch)
tree1903fe1bed986bb384cf536fbfc289cc30cdcb42 /Jellyfin.Drawing.Skia
parente498e471091c8dd6f03b71c9f269dd546bc8dde3 (diff)
move a variable out of for loop
Diffstat (limited to 'Jellyfin.Drawing.Skia')
-rw-r--r--Jellyfin.Drawing.Skia/StripCollageBuilder.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/Jellyfin.Drawing.Skia/StripCollageBuilder.cs b/Jellyfin.Drawing.Skia/StripCollageBuilder.cs
index f2162432a..7d404ce64 100644
--- a/Jellyfin.Drawing.Skia/StripCollageBuilder.cs
+++ b/Jellyfin.Drawing.Skia/StripCollageBuilder.cs
@@ -77,12 +77,14 @@ namespace Jellyfin.Drawing.Skia
{
canvas.Clear(SKColors.Black);
+ // number of images used in the thumbnail
+ var iCount = 3;
+
// determine sizes for each image that will composited into the final image
- var iSlice = Convert.ToInt32(width * 0.33);
- int iTrans = Convert.ToInt32(height * 0.25);
+ var iSlice = Convert.ToInt32(width / iCount);
int iHeight = Convert.ToInt32(height * 1.00);
int imageIndex = 0;
- for (int i = 0; i < 3; i++)
+ for (int i = 0; i < iCount; i++)
{
using (var currentBitmap = GetNextValidImage(paths, imageIndex, out int newIndex))
{