2 posts in this topic
I would like to get a region of the screen but avoiding having to save to a file first.
I believe it is a lack of knowledge on my part but the GUICtrlSetImage function does not allow you to define an image without being a file.
How to do this:
;.... $Pic3 = GUICtrlCreatePic("", 8, 64, 84, 84, -1, _ $WS_EX_STATICEDGE) ;para ter borda em baixo relevo ;.... _ScreenCapture_Capture(@ScriptDir & "\areatemp.jpg", 10, 10, 200, 200) GUICtrlSetImage($Pic3, @ScriptDir & "\areatemp.jpg") ;....
Create water effects using waterctrl.dll.
I'm trying to use '?do=embed' frameborder='0' data-embedContent>> but none of the examples work. Mostly, I'm just not seeing any pictures, just nothing, a window with some text but no picture. What am I doing wrong? Do these examples work for anybody else?
I'd like to load a BMP file then change chosen color (0xFF00FF) to transparent and save it as PNG file. I'm using a code from other thread. I've modified it a little, but it still doesn't work.
My program displays image with transparent color correctly, however saves a black image file.
#include <Constants.au3> #include <WinAPIEx.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <ScreenCapture.au3> #include <WinAPI.au3> Global Const $STM_SETIMAGE = 0x0172 Global Const $STM_GETIMAGE = 0x0173 $hForm = GUICreate('MyGUI', 400, 400) $Pic = GUICtrlCreatePic('', 50, 50, 144, 87) $hPic = GUICtrlGetHandle(-1) _GDIPlus_Startup() $hDstDC = _WinAPI_CreateCompatibleDC(0) $hBitmap = _WinAPI_CreateSolidBitmap(0, _WinAPI_GetSysColor($COLOR_3DFACE), 144, 87, 0) $hDstSv = _WinAPI_SelectObject($hDstDC, $hBitmap) $hSrcDC = _WinAPI_CreateCompatibleDC(0) $hImg = _WinAPI_LoadImage(0, @ScriptDir & '\piclvq.bmp', $IMAGE_BITMAP, 0, 0, $LR_LOADFROMFILE) $hSrcSv = _WinAPI_SelectObject($hSrcDC, $hImg) _WinAPI_TransparentBlt($hDstDC, 0, 0, 144, 87, $hSrcDC, 0, 0, 144, 87, 0xFF00FF) $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hForm) $hImage = _GDIPlus_BitmapCreateFromGraphics(144, 87, $hGraphic) ; Save resultant image _GDIPlus_ImageSaveToFile($hImage, "My_transparent_image.png") _WinAPI_SelectObject($hDstDC, $hDstSv) _WinAPI_DeleteDC($hDstDC) _WinAPI_SelectObject($hSrcDC, $hSrcSv) _WinAPI_DeleteDC($hSrcDC) _WinAPI_DeleteObject($hImg) _WinAPI_DeleteObject(_SendMessage($hPic, $STM_SETIMAGE, $IMAGE_BITMAP, $hBitmap)) $hPic = _SendMessage($hPic, $STM_GETIMAGE) If $hPic <> $hBitmap Then _WinAPI_DeleteObject($hBitmap) EndIf GUISetState() Do Until GUIGetMsg() = -3 piclvq.bmp
Hello all. I am trying to figure out the best approach to compare PDF outputs for consistency. Currently, this is a human task where PDFs are held up to a light to see if all the values line up exactly with test data. I have to believe there is a better way. That said GDIPlus is a bit of a mystery to me - I have looked at some of the functions - and I stumbled upon >this very useful script in my forum search. My question is: would converting the PDF to an image and comparing the image with GDIPlus be the way to go or is there a different more efficient approach that you would recommend? Any guidance would be greatly appreciated.