frankzappa Posted May 8, 2008 Posted May 8, 2008 Hey all, i need to save a monochromatic BMP file. I've been using ScreenCapture for these kind of tasks, so i was trying to stick with it. The problem is that ScreenCapture doesn't save monochromatic files normally. I checked the code and GDIPLus (called by ScreenCapture) does have the possibility to save these kind of files: CODE; Pixel Format constants Global Const $GDIP_PXF01INDEXED = 0x00030101 ; 1 bpp, indexed So i changed the code for ScreenCapture.au3 (had to save it somewhere else and change its name) to allow me save monochromatic BMPs. The problem is that the file is not created, so i think this may be a bug from GDIPlus. The code edited in ScreenCapture: CODEFunc _ScreenCapture_SetBMPFormat($iFormat) Switch $iFormat Case 0 $giBMPFormat = $GDIP_PXF16RGB555 Case 1 $giBMPFormat = $GDIP_PXF16RGB565 Case 2 $giBMPFormat = $GDIP_PXF24RGB Case 3 $giBMPFormat = $GDIP_PXF32RGB Case 4 $giBMPFormat = $GDIP_PXF32ARGB Case 5 $giBMPFormat = $GDIP_PXF01INDEXED ;edited Case Else $giBMPFormat = $GDIP_PXF24RGB EndSwitch EndFunc ;==>_ScreenCapture_SetBMPFormat I've checked if saving BMP in the normal formats was working, everythings fine as long as i stick to case 2 ($GDIP_PXF24RGB). So, does anyone had this problem oneday? cheers.
frankzappa Posted May 9, 2008 Author Posted May 9, 2008 hoho, i think this one must be a bug.... Anyway, i found a way to work the thing around. cheers.
ChrisL Posted May 9, 2008 Posted May 9, 2008 Anyway, i found a way to work the thing around.cheers.Maybe you'd like to share your method in case others need to do the same [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
AdmiralAlkex Posted May 9, 2008 Posted May 9, 2008 (edited) EDIT: forget what I said, it's not working Edited May 9, 2008 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now