mirror of
https://github.com/claunia/libexeinfo.git
synced 2025-12-16 19:14:24 +00:00
Change signedness of some GEM resource fields, corrects working with >=32KiB resources.
This commit is contained in:
@@ -38,8 +38,8 @@ namespace exeinfogui.GEM
|
||||
const uint ALPHAMASK = 0xFF000000;
|
||||
List<int> pixels = new List<int>();
|
||||
|
||||
byte[] data = libexeinfo.GEM.FlipPlane(icon.Data, icon.Width);
|
||||
byte[] mask = libexeinfo.GEM.FlipPlane(icon.Mask, icon.Width);
|
||||
byte[] data = libexeinfo.GEM.FlipPlane(icon.Data, (int)icon.Width);
|
||||
byte[] mask = libexeinfo.GEM.FlipPlane(icon.Mask, (int)icon.Width);
|
||||
|
||||
for(int pos = 0; pos < data.Length; pos++)
|
||||
{
|
||||
@@ -48,7 +48,7 @@ namespace exeinfogui.GEM
|
||||
((mask[pos] & (1 << i)) != 0 ? ALPHAMASK : 0)));
|
||||
}
|
||||
|
||||
return new Bitmap(icon.Width, icon.Height, PixelFormat.Format32bppRgba, pixels);
|
||||
return new Bitmap((int)icon.Width, (int)icon.Height, PixelFormat.Format32bppRgba, pixels);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -95,8 +95,8 @@ namespace exeinfogui.GEM
|
||||
txtText.Text = colorIcon.Monochrome.Text;
|
||||
imgIcon.Image = GemIcon.GemIconToEto(colorIcon.Monochrome);
|
||||
treePlanes.DataStore = colorIcon.Color;
|
||||
iconWidth = colorIcon.Monochrome.Width;
|
||||
iconHeight = colorIcon.Monochrome.Height;
|
||||
iconWidth = (int)colorIcon.Monochrome.Width;
|
||||
iconHeight = (int)colorIcon.Monochrome.Height;
|
||||
treePlanes.SelectRow(0);
|
||||
if(colorIcon.Color != null && colorIcon.Color.Length >= 1 && colorIcon.Color[0] != null)
|
||||
{
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace exeinfogui.GEM
|
||||
|
||||
byte[] data = new byte[node.BitBlock.Data.Length];
|
||||
int pos = 0;
|
||||
int w = node.BitBlock.Width / 8;
|
||||
int w = (int)(node.BitBlock.Width / 8);
|
||||
// This flips the image.
|
||||
while(pos < data.Length)
|
||||
{
|
||||
@@ -91,7 +91,7 @@ namespace exeinfogui.GEM
|
||||
for(int i = 0; i < 8; i++)
|
||||
pixels.Add((b & (1 << i)) != 0 ? color : background);
|
||||
|
||||
return new Bitmap(node.BitBlock.Width, node.BitBlock.Height, PixelFormat.Format32bppRgb, pixels);
|
||||
return new Bitmap((int)node.BitBlock.Width, (int)node.BitBlock.Height, PixelFormat.Format32bppRgb, pixels);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user