mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-26 01:56:46 +00:00
Update variable names and add Debug Error message
This commit is contained in:
@@ -458,11 +458,11 @@ namespace PckStudio
|
||||
case PCKFile.FileData.FileType.TextureFile:
|
||||
// TODO: Add tga support
|
||||
if (Path.GetExtension(file.filepath) == ".tga") break;
|
||||
using (MemoryStream png = new MemoryStream(file.data))
|
||||
using (MemoryStream stream = new MemoryStream(file.data))
|
||||
{
|
||||
try
|
||||
{
|
||||
pictureBoxImagePreview.Image = Image.FromStream(png);
|
||||
pictureBoxImagePreview.Image = Image.FromStream(stream);
|
||||
labelImageSize.Text = $"{pictureBoxImagePreview.Image.Size.Width}x{pictureBoxImagePreview.Image.Size.Height}";
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -470,6 +470,7 @@ namespace PckStudio
|
||||
labelImageSize.Text = "";
|
||||
pictureBoxImagePreview.Image = Resources.NoImageFound;
|
||||
Debug.WriteLine("Not a supported image format. Setting back to default");
|
||||
Debug.WriteLine(string.Format("An error occured of type: {0} with message: {1}", ex.GetType(), ex.Message), "Exception");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user