mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-05 23:17:10 +01:00
win32: output more info if RawImage_CreateBitmap failed
git-svn-id: trunk@12850 -
This commit is contained in:
parent
b61b519db3
commit
0f8d072150
@ -476,7 +476,11 @@ begin
|
||||
ABitmap := Windows.CreateDIBSection(DC, Windows.PBitmapInfo(@Info)^, DIB_RGB_COLORS, BitsPtr, 0, 0);
|
||||
Windows.ReleaseDC(0, DC);
|
||||
|
||||
if ABitmap = 0 then Exit;
|
||||
if ABitmap = 0 then
|
||||
begin
|
||||
DebugLn('Windows.CreateDIBSection returns 0. Reason = ' + GetLastErrorText(Windows.GetLastError));
|
||||
Exit;
|
||||
end;
|
||||
if BitsPtr = nil then Exit;
|
||||
|
||||
// copy the image data
|
||||
@ -492,6 +496,8 @@ begin
|
||||
if ASkipMask then Exit(True);
|
||||
|
||||
AMask := Windows.CreateBitmap(ADesc.Width, ADesc.Height, 1, 1, ARawImage.Mask);
|
||||
if AMask = 0 then
|
||||
DebugLn('Windows.CreateBitmap returns 0. Reason = ' + GetLastErrorText(Windows.GetLastError));
|
||||
Result := AMask <> 0;
|
||||
//DbgDumpBitmap(AMask, 'CreateBitmaps - Mask');
|
||||
end;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user