Fur 0 Posted May 2, 2005 So I have this image map.bmp my DLL has generated and I'm trying to view with GuiCtrlCreatePic(), but it always shows in a grey scale. Is there something I'm missing? The BMP may have an issue with the pallet or something, but every other tool I own will open it and display it just fine... map.bmp #include <GUIConstants.au3> GUICreate("My GUI picture",150,150,-1,-1,$WS_SIZEBOX+$WS_SYSMENU) ; will create a dialog box that when displayed is centered $n=GUICtrlCreatePic(@Workingdir & "\map.bmp",0,0,100,100) GUISetState (@SW_SHOW) ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Share this post Link to post Share on other sites
Lazycat 13 Posted May 3, 2005 I can be wrong, but you picture seems more than 24 bit color depth. Probably Autoit have troubles with such images. You can compare your bitmap saving code with mine captdll.dll code (link in sig). Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Share this post Link to post Share on other sites
Fur 0 Posted May 3, 2005 Yes, its saved as 32 bit, which is supposed to actually only contain 24 bit worth of color, just each pixel is padded out by 8 extra bits. Just like 24 bit, its not supposed to contain a pallet. My code just uses LoadImage() to load them, which works fine for me. That is what I would assume is what AutoIt would use to load them, but apparently not! I'll look at your code, thanks! Share this post Link to post Share on other sites
Fur 0 Posted May 3, 2005 Hmm.. that's what I figured, you're saving as 24 bit. I prefer keeping mine in 32 bit, because all my code uses 32 bit DIBs for the raw speed in searching them in memory. I guess I can have it write out two versions one in 24 bit and one in 32 bit as a workaround. Maybe I can get BitBlt() to do the conversion for me.. Share this post Link to post Share on other sites