ImageExtensions - Renamed 'ResizeImage' to 'Resize'

This commit is contained in:
miku-666
2023-08-03 12:31:10 +02:00
parent 8b7d71f750
commit afb01e6e32
3 changed files with 7 additions and 8 deletions

View File

@@ -125,12 +125,12 @@ namespace PckStudio.Extensions
return new Size(width, height);
}
internal static Image ResizeImage(this Image image, Size size, GraphicsConfig graphicsConfig)
internal static Image Resize(this Image image, Size size, GraphicsConfig graphicsConfig)
{
return image.ResizeImage(size.Width, size.Height, graphicsConfig);
return image.Resize(size.Width, size.Height, graphicsConfig);
}
internal static Image ResizeImage(this Image image, int width, int height, GraphicsConfig graphicsConfig)
internal static Image Resize(this Image image, int width, int height, GraphicsConfig graphicsConfig)
{
var destRect = new Rectangle(0, 0, width, height);
var destImage = new Bitmap(width, height);

View File

@@ -265,7 +265,7 @@ namespace PckStudio
PixelOffsetMode = PixelOffsetMode.HighQuality
};
if (texture.Size != _areaSize)
texture = texture.ResizeImage(_areaSize, graphicsConfig);
texture = texture.Resize(_areaSize, graphicsConfig);
using (var g = Graphics.FromImage(originalPictureBox.Image))
{
g.ApplyConfig(graphicsConfig);
@@ -348,7 +348,6 @@ namespace PckStudio
}
return false;
// return base.ProcessDialogKey(keyData);
}
}
}

View File

@@ -1034,15 +1034,15 @@ namespace PckStudio.Forms
if (saveSkin.Width == saveSkin.Height)
{
saveSkin.ResizeImage(64, 64, config);
saveSkin.Resize(64, 64, config);
}
else if (saveSkin.Height == saveSkin.Width / 2)
{
saveSkin.ResizeImage(64, 32, config);
saveSkin.Resize(64, 32, config);
}
else
{
saveSkin.ResizeImage(64, 64, config);
saveSkin.Resize(64, 64, config);
}
saveSkin.Save(root + "/" + skinTexture.Filename, ImageFormat.Png);
}