move a variable out of for loop

This commit is contained in:
dkanada 2019-03-09 11:17:02 +09:00
parent e498e47109
commit 47095e6cf8

View file

@ -77,12 +77,14 @@ namespace Jellyfin.Drawing.Skia
{ {
canvas.Clear(SKColors.Black); 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 // determine sizes for each image that will composited into the final image
var iSlice = Convert.ToInt32(width * 0.33); var iSlice = Convert.ToInt32(width / iCount);
int iTrans = Convert.ToInt32(height * 0.25);
int iHeight = Convert.ToInt32(height * 1.00); int iHeight = Convert.ToInt32(height * 1.00);
int imageIndex = 0; 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)) using (var currentBitmap = GetNextValidImage(paths, imageIndex, out int newIndex))
{ {