[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pnet-developers] [bug #13595] Form with Icon crashes on Win32 ilrun
From: |
Erich Kitzmüller |
Subject: |
[Pnet-developers] [bug #13595] Form with Icon crashes on Win32 ilrun |
Date: |
Tue, 5 Jul 2005 05:58:49 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 |
Follow-up Comment #1, bug #13595 (project dotgnu-pnet):
I think the bug is in DrawingTopLevelWindow.HandleFromBitmap:
private IntPtr HandleFromBitmap(Frame frame, bool andMask)
{
// By default we use the data straight from the frame.
byte[] data = frame.Data;
if (andMask)
{
//TODO: this could be slow.
// Create a new image that we will copy the pixels to,
leaving the masked
pixels black.
DotGNU.Images.Image newImage = new
DotGNU.Images.Image(frame.Width,
frame.Height, frame.PixelFormat);
// --> frame.PixelFormat is indexed for Icons, isn't it
Frame newFrame = newImage.AddFrame();
// --> newFrame doesn't have a palette yet
data = new byte[data.Length];
for (int y = 0; y < frame.Height; y++)
{
for (int x = 0; x < frame.Width; x++)
{
if (frame.GetMask(x, y) != 0)
newFrame.SetPixel(x, y,
frame.GetPixel(x, y));
// --> SetPixel crashes when called on a frame without palette
}
}
data = newFrame.Data;
}
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=13595>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.gnu.org/