Leaderboard
Popular Content
Showing content with the highest reputation on 02/06/2024 in all areas
-
I wanted to use OpenCV v4+ in AutoIt. I found Opencv UDF on the forum, but there was no support for OpenCV v4+ This UDF provides support for OpenCV v4+ Update There is a new implementation using COM. It is almost as easy as python to use It is also possible to interact with GDI+ Download and extract opencv-4.10.0-windows.exe into a folder Download and extract autoit-opencv-4.10.0-com-v2.6.2.7z into a folder Sources Here Documentation A generated documentation for functions is available here Examples More samples can be found here To run them, please follow these instructions Showing an image #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include "autoit-opencv-com\udf\opencv_udf_utils.au3" _OpenCV_Open("opencv-4.7.0-windows\opencv\build\x64\vc16\bin\opencv_world470.dll", "autoit-opencv-com\autoit_opencv_com470.dll") OnAutoItExitRegister("_OnAutoItExit") Example() Func Example() Local $cv = _OpenCV_get() If Not IsObj($cv) Then Return Local $img = _OpenCV_imread_and_check(_OpenCV_FindFile("samples\data\lena.jpg")) $cv.imshow("Image", $img) $cv.waitKey() $cv.destroyAllWindows() EndFunc ;==>Example Func _OnAutoItExit() _OpenCV_Close() EndFunc ;==>_OnAutoItExit Drawing contours #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include "autoit-opencv-com\udf\opencv_udf_utils.au3" _OpenCV_Open("opencv-4.7.0-windows\opencv\build\x64\vc16\bin\opencv_world470.dll", "autoit-opencv-com\autoit_opencv_com470.dll") OnAutoItExitRegister("_OnAutoItExit") Example() Func Example() Local $cv = _OpenCV_get() If Not IsObj($cv) Then Return Local $img = _OpenCV_imread_and_check("samples\data\pic1.png") Local $img_grey = $cv.cvtColor($img, $CV_COLOR_BGR2GRAY) $cv.threshold($img_grey, 100, 255, $CV_THRESH_BINARY) Local $thresh = $cv.extended[1] Local $contours = $cv.findContours($thresh, $CV_RETR_TREE, $CV_CHAIN_APPROX_SIMPLE) ConsoleWrite("Found " & UBound($contours) & " contours" & @CRLF & @CRLF) $cv.drawContours($img, $contours, -1, _OpenCV_Scalar(0, 0, 255), 2) $cv.imshow("Image", $img) $cv.waitKey() $cv.destroyAllWindows() EndFunc ;==>Example Func _OnAutoItExit() _OpenCV_Close() EndFunc ;==>_OnAutoItExit Showing an image in autoit GUI #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include "autoit-opencv-com\udf\opencv_udf_utils.au3" #include <GUIConstantsEx.au3> _OpenCV_Open("opencv-4.7.0-windows\opencv\build\x64\vc16\bin\opencv_world470.dll", "autoit-opencv-com\autoit_opencv_com470.dll") OnAutoItExitRegister("_OnAutoItExit") Example() Func Example() Local $cv = _OpenCV_get() If Not IsObj($cv) Then Return #Region ### START Koda GUI section ### Form= Local $FormGUI = GUICreate("show image in autoit gui", 400, 400, 200, 200) Local $Pic = GUICtrlCreatePic("", 0, 0, 400, 400) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Local $img = _OpenCV_imread_and_check(_OpenCV_FindFile("samples\data\lena.jpg")) _OpenCV_imshow_ControlPic($img, $FormGUI, $Pic) Local $nMsg While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd $cv.destroyAllWindows() EndFunc ;==>Example Func _OnAutoItExit() _OpenCV_Close() EndFunc ;==>_OnAutoItExit Showing an image in an autosized autoit GUI #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include "autoit-opencv-com\udf\opencv_udf_utils.au3" #include <GUIConstantsEx.au3> _OpenCV_Open("opencv-4.7.0-windows\opencv\build\x64\vc16\bin\opencv_world470.dll", "autoit-opencv-com\autoit_opencv_com470.dll") OnAutoItExitRegister("_OnAutoItExit") Example() Func Example() Local $cv = _OpenCV_get() If Not IsObj($cv) Then Return #Region ### START Koda GUI section ### Form= Local $FormGUI = GUICreate("show image in autoit gui [WINDOW_AUTOSIZE]", 400, 400, 200, 200) Local $Pic = GUICtrlCreatePic("", 0, 0, 400, 400) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Local $img = _OpenCV_imread_and_check(_OpenCV_FindFile("samples\data\lena.jpg")) ; get the image size and resize the GUI and the PIC control WinMove($FormGUI, "", Default, Default, $img.width, $img.height) GUICtrlSetPos($Pic, Default, Default, $img.width, $img.height) _OpenCV_imshow_ControlPic($img, $FormGUI, $Pic) Local $nMsg While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd $cv.destroyAllWindows() EndFunc ;==>Example Func _OnAutoItExit() _OpenCV_Close() EndFunc ;==>_OnAutoItExit Screen capture #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include "autoit-opencv-com\udf\opencv_udf_utils.au3" _OpenCV_Open("opencv-4.7.0-windows\opencv\build\x64\vc16\bin\opencv_world470.dll", "autoit-opencv-com\autoit_opencv_com470.dll") OnAutoItExitRegister("_OnAutoItExit") Example() Func Example() Local $cv = _OpenCV_get() If Not IsObj($cv) Then Return Local $iLeft = 200 Local $iTop = 200 Local $iWidth = 400 Local $iHeight = 400 Local $aRect[4] = [$iLeft, $iTop, $iWidth, $iHeight] Local $img = _OpenCV_GetDesktopScreenMat($aRect) $cv.imshow("Screen capture", $img) $cv.waitKey() $cv.destroyAllWindows() EndFunc ;==>Example Func _OnAutoItExit() _OpenCV_Close() EndFunc ;==>_OnAutoItExit Find template #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include "autoit-opencv-com\udf\opencv_udf_utils.au3" _OpenCV_Open("opencv-4.7.0-windows\opencv\build\x64\vc16\bin\opencv_world470.dll", "autoit-opencv-com\autoit_opencv_com470.dll") OnAutoItExitRegister("_OnAutoItExit") Example() Func Example() Local $cv = _OpenCV_get() If Not IsObj($cv) Then Return Local $img = _OpenCV_imread_and_check(_OpenCV_FindFile("samples\data\mario.png")) Local $tmpl = _OpenCV_imread_and_check(_OpenCV_FindFile("samples\data\mario_coin.png")) ; The higher the value, the higher the match is exact Local $threshold = 0.8 Local $aMatches = _OpenCV_FindTemplate($img, $tmpl, $threshold) Local $aRedColor = _OpenCV_RGB(255, 0, 0) Local $aMatchRect[4] = [0, 0, $tmpl.width, $tmpl.height] For $i = 0 To UBound($aMatches) - 1 $aMatchRect[0] = $aMatches[$i][0] $aMatchRect[1] = $aMatches[$i][1] ; Draw a red rectangle around the matched position $cv.rectangle($img, $aMatchRect, $aRedColor) Next $cv.imshow("Find template example", $img) $cv.waitKey() $cv.destroyAllWindows() EndFunc ;==>Example Func _OnAutoItExit() _OpenCV_Close() EndFunc ;==>_OnAutoItExit Video capture file #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include "autoit-opencv-com\udf\opencv_udf_utils.au3" #include <Misc.au3> _OpenCV_Open("opencv-4.7.0-windows\opencv\build\x64\vc16\bin\opencv_world470.dll", "autoit-opencv-com\autoit_opencv_com470.dll") OnAutoItExitRegister("_OnAutoItExit") Example() Func Example() Local $cv = _OpenCV_get() If Not IsObj($cv) Then Return Local $cap = _OpenCV_ObjCreate("cv.VideoCapture").create(_OpenCV_FindFile("samples\data\vtest.avi")) If Not $cap.isOpened() Then ConsoleWriteError("!>Error: cannot open the video file." & @CRLF) Exit EndIf Local $frame = _OpenCV_ObjCreate("cv.Mat") While 1 If _IsPressed("1B") Or _IsPressed(Hex(Asc("Q"))) Then ExitLoop EndIf If Not $cap.read($frame) Then ConsoleWriteError("!>Error: cannot read the video or end of the video." & @CRLF) ExitLoop EndIf $cv.imshow("capture video file", $frame) Sleep(30) WEnd $cv.destroyAllWindows() EndFunc ;==>Example Func _OnAutoItExit() _OpenCV_Close() EndFunc ;==>_OnAutoItExit Video capture camera #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include "autoit-opencv-com\udf\opencv_udf_utils.au3" #include <Misc.au3> _OpenCV_Open("opencv-4.7.0-windows\opencv\build\x64\vc16\bin\opencv_world470.dll", "autoit-opencv-com\autoit_opencv_com470.dll") OnAutoItExitRegister("_OnAutoItExit") Example() Func Example() Local $cv = _OpenCV_get() If Not IsObj($cv) Then Return Local $iCamId = 0 Local $cap = _OpenCV_ObjCreate("cv.VideoCapture").create($iCamId) If Not $cap.isOpened() Then ConsoleWriteError("!>Error: cannot open the camera." & @CRLF) Exit EndIf Local $frame = _OpenCV_ObjCreate("cv.Mat") While 1 If _IsPressed("1B") Or _IsPressed(Hex(Asc("Q"))) Then ExitLoop EndIf If $cap.read($frame) Then ;; Flip the image horizontally to give the mirror impression $frame = $cv.flip($frame, 1) $cv.imshow("capture camera", $frame) Else ConsoleWriteError("!>Error: cannot read the camera." & @CRLF) EndIf Sleep(30) WEnd $cv.destroyAllWindows() EndFunc ;==>Example Func _OnAutoItExit() _OpenCV_Close() EndFunc ;==>_OnAutoItExit Resize an image with GDI+ #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include "autoit-opencv-com\udf\opencv_udf_utils.au3" _OpenCV_Open("opencv-4.7.0-windows\opencv\build\x64\vc16\bin\opencv_world470.dll", "autoit-opencv-com\autoit_opencv_com470.dll") _GDIPlus_Startup() OnAutoItExitRegister("_OnAutoItExit") Example() Func Example() Local $cv = _OpenCV_get() If Not IsObj($cv) Then Return Local $bMethod = 1 Local $img = _OpenCV_imread_and_check(_OpenCV_FindFile("samples\tutorial_code\yolo\scooter-5180947_1920.jpg")) Local $resized If $bMethod Then $resized = $img.GdiplusResize(600, 400) Else Local $hImage = $img.convertToBitmap() Local $hResizedImage = _GDIPlus_ImageResize($hImage, 600, 400) _GDIPlus_BitmapDispose($hImage) $resized = $cv.createMatFromBitmap($hResizedImage) _GDIPlus_BitmapDispose($hResizedImage) EndIf $cv.imshow("Resized with GDI+", $resized) $cv.waitKey() $cv.destroyAllWindows() EndFunc ;==>Example Func _OnAutoItExit() _GDIPlus_Shutdown() _OpenCV_Close() EndFunc ;==>_OnAutoItExit1 point
-
Not in SciTE itself, but you could have a separate process that monitors the SciTEOutputpane and display that in your own GUI.1 point
-
I've only tested this one by smbape Its amazing. Saludos1 point
-
No over here where it started with the initial UIAWrapper libraries which was taken bij @LarsJ further in many more examples and updated interfaces from Microsoft The UIAwrappers library can make life easier but never had the time to fix issues and improve. Some helper functions can be handy like highlight rectangle so you can see you found the area. But be aware that UIA is not easy to learn as a starter. I checked your Nitro PDF and Winamp and both are doable with UIA but can be hard and tedious. The tree of WinAmp is not nicely behaving (as its hard to get with tools like inspect.exe) with UIASpy you can get tot your controls by using keys F1-F4 when you hover over certain elements and 90% can be recognized and you can generate parts of the code with UIASpy Clicking can be done like UIA_MouseClick( $oTreeItem1 ) ConsoleWrite( "UIA_MouseClick( $oTreeItem1 )" & @CRLF ) but you have to write code for the whole hierarchy ; --- Condition to find window/control --- ConsoleWrite( "--- Condition to find window/control ---" & @CRLF ) Local $pCondition0 $oUIAutomation.CreatePropertyCondition( $UIA_ClassNamePropertyId, "Winamp v1.x", $pCondition0 ) If Not $pCondition0 Then Return ConsoleWrite( "$pCondition0 ERR" & @CRLF ) ConsoleWrite( "$pCondition0 OK" & @CRLF ) and then below the window you find in detail more objects ; --- Condition to find window/control --- ConsoleWrite( "--- Condition to find window/control ---" & @CRLF ) Local $pCondition0 $oUIAutomation.CreatePropertyCondition( $UIA_NamePropertyId, "1. DJ Mike Llama - Llama Whippin' Intro - Winamp [Stopped]", $pCondition0 ) If Not $pCondition0 Then Return ConsoleWrite( "$pCondition0 ERR" & @CRLF ) ConsoleWrite( "$pCondition0 OK" & @CRLF ) ; --- Find window/control --- ConsoleWrite( "--- Find window/control ---" & @CRLF ) Local $pPane1, $oPane1 $oParent.FindFirst( $TreeScope_Descendants, $pCondition0, $pPane1 ) $oPane1 = ObjCreateInterface( $pPane1, $sIID_IUIAutomationElement, $dtag_IUIAutomationElement ) If Not IsObj( $oPane1 ) Then Return ConsoleWrite( "$oPane1 ERR" & @CRLF ) ConsoleWrite( "$oPane1 OK" & @CRLF ) and reaching your control of interest ; --- Find window/control --- ConsoleWrite( "--- Find window/control ---" & @CRLF ) Local $pCondition1 $oUIAutomation.CreatePropertyCondition( $UIA_NamePropertyId, "Audio", $pCondition1 ) If Not $pCondition1 Then Return ConsoleWrite( "$pCondition1 ERR" & @CRLF ) ConsoleWrite( "$pCondition1 OK" & @CRLF ) Local $pTreeItem1, $oTreeItem1 $oPane1.FindFirst( $TreeScope_Descendants, $pCondition1, $pTreeItem1 ) $oTreeItem1 = ObjCreateInterface( $pTreeItem1, $sIID_IUIAutomationElement, $dtag_IUIAutomationElement ) If Not IsObj( $oTreeItem1 ) Then Return ConsoleWrite( "$oTreeItem1 ERR" & @CRLF ) ConsoleWrite( "$oTreeItem1 OK" & @CRLF ) I will clean it up a little and put the working example below later edit: cleaned up but unfortunately not working but gives you an idea on how to set this up step by step for winamp. #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 ;#AutoIt3Wrapper_UseX64=n ; If target application is running as 32 bit code ;#AutoIt3Wrapper_UseX64=y ; If target application is running as 64 bit code #include "includes\UIA_Constants.au3" ; Can be copied from UIASpy Includes folder #include "includes\UIA_Functions.au3" ; Can be copied from UIASpy Includes folder #include "includes\UIA_SafeArray.au3" ; Can be copied from UIASpy Includes folder #include "includes\UIA_Variant.au3" ; Can be copied from UIASpy Includes folder Opt( "MustDeclareVars", 1 ) Example() Func Example() ; Create UI Automation object Local $oUIAutomation = ObjCreateInterface( $sCLSID_CUIAutomation, $sIID_IUIAutomation, $dtag_IUIAutomation ) If Not IsObj( $oUIAutomation ) Then Return ConsoleWrite( "$oUIAutomation ERR" & @CRLF ) ConsoleWrite( "$oUIAutomation OK" & @CRLF ) ; Get Desktop element Local $pDesktop, $oDesktop $oUIAutomation.GetRootElement( $pDesktop ) $oDesktop = ObjCreateInterface( $pDesktop, $sIID_IUIAutomationElement, $dtag_IUIAutomationElement ) If Not IsObj( $oDesktop ) Then Return ConsoleWrite( "$oDesktop ERR" & @CRLF ) ConsoleWrite( "$oDesktop OK" & @CRLF ) ; --- Condition to find window/control --- #Region Local $pCondition1 $oUIAutomation.CreatePropertyCondition( $UIA_ClassNamePropertyId, "Winamp v1.x", $pCondition1 ) If Not $pCondition1 Then Return ConsoleWrite( "$pCondition1 ERR" & @CRLF ) ConsoleWrite( "$pCondition1 OK" & @CRLF ) ; --- Find window/control --- ConsoleWrite( "--- Find window/control ---" & @CRLF ) Local $pWindow, $oWindow $oDesktop.FindFirst( $TreeScope_Children, $pCondition1, $pWindow ) $oWindow = ObjCreateInterface( $pWindow, $sIID_IUIAutomationElement, $dtag_IUIAutomationElement ) If Not IsObj( $oWindow ) Then Return ConsoleWrite( "$oWindow ERR" & @CRLF ) ConsoleWrite( "$oWindow OK" & @CRLF ) #EndRegion #region ; --- Find window/control --- ConsoleWrite( "--- Find window/control ---" & @CRLF ) Local $pCondition2 $oUIAutomation.CreatePropertyCondition( $UIA_NamePropertyId, "Audio", $pCondition2 ) If Not $pCondition2 Then Return ConsoleWrite( "$pCondition2 ERR" & @CRLF ) ConsoleWrite( "$pCondition2 OK" & @CRLF ) Local $pTreeItem1, $oTreeItem1 $oWindow.FindFirst($TreeScope_Descendants, $pCondition2, $pTreeItem1 ) $oTreeItem1 = ObjCreateInterface( $pTreeItem1, $sIID_IUIAutomationElement, $dtag_IUIAutomationElement ) If Not IsObj( $oTreeItem1 ) Then Return ConsoleWrite( "$oTreeItem1 ERR" & @CRLF ) ConsoleWrite( "$oTreeItem1 OK" & @CRLF ) ; --- Code Snippets --- ConsoleWrite( "--- Code Snippets ---" & @CRLF ) #endregion UIA_MouseClick( $oTreeItem1 ) ConsoleWrite( "UIA_MouseClick( $oTreeItem1 )" & @CRLF ) EndFunc1 point
-
read and write xlsx files without Excel
ermar reacted to AspirinJunkie for a topic
No it's not possible with this function. However, you can use the function as a template to understand the structure of an xlsx file and write your own function with the corresponding functionality based on this.1 point -
this was the first approach ... after that I went a little further more is to share the idea1 point
-
_GDIPlus_GIFAnim.au3 ;coded by UEZ build 2017-07-04 ;requires 3.3.11.5+ #AutoIt3Wrapper_Version=b #include-once #include <GDIPlus.au3> #include <Memory.au3> ;_GDIPlus_BitmapConvertTo8Bit ;_GDIPlus_GIFAnimCreateFile ;_GDIPlus_GIFAnimExtractAllFrames ;_GDIPlus_GIFAnimGetFrameCount ;_GDIPlus_GIFAnimGetFrameDelays ;_GDIPlus_GIFAnimGetFrameDelaysFromBinFile ;_GDIPlus_GIFAnimGetFrameDimensionsCount ;_GDIPlus_GIFAnimGetFrameDimensionsList ;_GDIPlus_GIFAnimSelectActiveFrame ;_GDIPlus_ImageGetColorPalette ;_GDIPlus_ImageGetColorPaletteSize ;_GDIPlus_ImageSaveAdd ;_GDIPlus_ImageSaveAddImage ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_GIFAnimGetFrameDimensionsCount ; Description ...: Gets the number of frame dimensions in this Image object. ; Syntax ........: _GDIPlus_GIFAnimGetFrameDimensionsCount($hImage) ; Parameters ....: $hImage - A handle to an image / bitmap object ; Return values .: The number of frame dimensions in this Image object. ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; =============================================================================================================================== Func _GDIPlus_GIFAnimGetFrameDimensionsCount($hImage) Local Const $aResult = DllCall($__g_hGDIPDll, "int", "GdipImageGetFrameDimensionsCount", "handle", $hImage, "ulong*", 0) If @error Then Return SetError(@error, @extended, 0) If $aResult[0] Then Return SetError(10, $aResult[0], 0) Return $aResult[2] EndFunc ;==>_GDIPlus_GIFAnimGetFrameDimensionsCount ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_GIFAnimGetFrameDimensionsList ; Description ...: Gets the identifiers for the frame dimensions of this Image object which fills the GUID struct. ; Syntax ........: _GDIPlus_GIFAnimGetFrameDimensionsList($hImage, $iFramesCount) ; Parameters ....: $hImage - A handle to an image / bitmap object ; $iFramesCount - An integer value. ; Return values .: tagGUID struct ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; =============================================================================================================================== Func _GDIPlus_GIFAnimGetFrameDimensionsList($hImage, $iFramesCount) Local Const $tGUID = DllStructCreate($tagGUID) Local Const $aResult = DllCall($__g_hGDIPDll, "int", "GdipImageGetFrameDimensionsList", "handle", $hImage, "struct*", $tGUID, "uint", $iFramesCount) If @error Then Return SetError(@error, @extended, 0) If $aResult[0] Then Return SetError(10, $aResult[0], 0) Return $tGUID EndFunc ;==>_GDIPlus_GIFAnimGetFrameDimensionsList ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_GIFAnimGetFrameCount ; Description ...: Gets the frame count of the loaded gif by passing the GUID struct ; Syntax ........: _GDIPlus_GIFAnimGetFrameCount($hImage, $tGUID) ; Parameters ....: $hImage - A handle to an image / bitmap object ; $tGUID - A struct to a GUID that specifies the frame dimension. ; Return values .: The amount of frames from a GIF animated image handle ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: _GDIPlus_ImageLoadFromFile _GDIPlus_BitmapCreateFromFile ; Link ..........: ; =============================================================================================================================== Func _GDIPlus_GIFAnimGetFrameCount($hImage, $tGUID) Local Const $aResult = DllCall($__g_hGDIPDll, "int", "GdipImageGetFrameCount", "handle", $hImage, "struct*", $tGUID, "ptr*", 0) If @error Then Return SetError(@error, @extended, 0) If $aResult[0] Then Return SetError(10, $aResult[0], 0) Return Int($aResult[3]) EndFunc ;==>_GDIPlus_GIFAnimGetFrameCount ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_GIFAnimSelectActiveFrame ; Description ...: Selects the frame in this Image object specified by passing the GUID struct and current frame. ; Syntax ........: _GDIPlus_GIFAnimSelectActiveFrame($hImage, $tGUID, $iCurrentFrame) ; Parameters ....: $hImage - A handle to an image / bitmap object ; $tGUID - A struct to a GUID that specifies the frame dimension. ; $iCurrentFrame - An integer value. ; Return values .: True or False on errors ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: _GDIPlus_ImageLoadFromFile _GDIPlus_BitmapCreateFromFile ; Link ..........: ; =============================================================================================================================== Func _GDIPlus_GIFAnimSelectActiveFrame($hImage, $tGUID, $iCurrentFrame) Local Const $aResult = DllCall($__g_hGDIPDll, "int", "GdipImageSelectActiveFrame", "handle", $hImage, "struct*", $tGUID, "uint", $iCurrentFrame) If @error Then Return SetError(@error, @extended, 0) If $aResult[0] Then Return SetError(10, $aResult[0], 0) Return True EndFunc ;==>_GDIPlus_GIFAnimSelectActiveFrame ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_GIFAnimGetFrameDelays ; Description ...: Gets the delay of each frame from an image handle ; Syntax ........: _GDIPlus_GIFAnimGetFrameDelays($hImage, $iAnimFrameCount) ; Parameters ....: $hImage - A handle to an image / bitmap object ; $iAnimFrameCount - An integer value. ; Return values .: An array with the information about the delay of each frame or the error code ; Author ........: UEZ ; Modified ......: ; Remarks .......: If frame delays cannot be read try _GDIPlus_GIFAnimGetFrameDelaysFromBinFile instead ; Related .......: _GDIPlus_ImageLoadFromFile _GDIPlus_BitmapCreateFromFile _GDIPlus_ImageGetPropertyItem ; Link ..........: ; =============================================================================================================================== Func _GDIPlus_GIFAnimGetFrameDelays($hImage, $iAnimFrameCount) If $iAnimFrameCount < 2 Then Return SetError(1, 0, 0) Local Const $GDIP_PROPERTYTAGFRAMEDELAY = 0x5100 Local $tPropItem = __GDIPlus_ImageGetPropertyItem($hImage, $GDIP_PROPERTYTAGFRAMEDELAY) If IsDllStruct($tPropItem) And (Not @error) Then Local $iType = $tPropItem.type, $iLength, $tVal If $iType Then $iLength = $tPropItem.length Switch $iType Case 1 $tVal = DllStructCreate("byte delay[" & $iLength & "]", $tPropItem.value) Case 3 $tVal = DllStructCreate("short delay[" & Ceiling($iLength / 2) & "]", $tPropItem.value) Case 4 $tVal = DllStructCreate("long delay[" & Ceiling($iLength / 4) & "]", $tPropItem.value) Case Else Return SetError(3, 0, 0) EndSwitch Local $aFrameDelays[Int($iAnimFrameCount)], $i For $i = 0 To UBound($aFrameDelays) - 1 $aFrameDelays[$i] = $tVal.delay(($i + 1)) * 10 ;~ ConsoleWrite($i & ": "& $aFrameDelays[$i] & @CRLF) Next EndIf Return $aFrameDelays EndIf Return SetError(2, 0, 0) EndFunc ;==>_GDIPlus_GIFAnimGetFrameDelays ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_GIFAnimGetFrameDelaysFromBinFile ; Description ...: Gets the delay of each frame from a binary gif file ; Syntax ........: _GDIPlus_GIFAnimGetFrameDelaysFromBinFile($binGIF, $iAnimFrameCount[, $iDelay = 10]) ; Parameters ....: $binGIF - A binary string with the GIF anim. ; $iAnimFrameCount - An integer value. ; Return values .: An array with the information about the delay of each frame or the error code ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; =============================================================================================================================== Func _GDIPlus_GIFAnimGetFrameDelaysFromBinFile($binGIF, $iAnimFrameCount) If Not IsBinary($binGIF) Then Return SetError(1, 0, 0) If $iAnimFrameCount < 2 Then Return SetError(2, 0, 0) Local $aFrameDelays = StringRegExp($binGIF, "(?i)0021F904[[:xdigit:]]{2}([[:xdigit:]]{4})", 3) If @error Then Return SetError(3, 0, 0) Local Const $iDelay = 10 For $i = 0 To UBound($aFrameDelays) - 1 $aFrameDelays[$i] = $iDelay * Dec(StringRegExpReplace($aFrameDelays[$i], "([[:xdigit:]]{2})([[:xdigit:]]{2})", "$2$1")) Next If UBound($aFrameDelays) <> $iAnimFrameCount Then ReDim $aFrameDelays[$iAnimFrameCount] Return $aFrameDelays EndFunc ;==>_GDIPlus_GIFAnimGetFrameDelaysFromBinFile ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_GIFAnimExtractAllFrames ; Description ...: Extracts all frames from a GIF animation file with the option to resize the frames ; Syntax ........: _GDIPlus_GIFAnimExtractAllFrames($hImage, $sFilename[, $iJPGQual = 85[, $iW = 0[, $iH = 0[, $iResizeQual = 7[, ; $bReverse = False]]]]]) ; Parameters ....: $hImage - A handle to an image / bitmap object ; $sFilename - A string value. Folders will be created if not existing. ; $iJPGQual - [optional] An integer value. Default is 85. ; $iW - [optional] An integer value. Default is 0. ; $iH - [optional] An integer value. Default is 0. ; $iResizeQual - [optional] An integer value. Default is 2. ; $bReverse - [optional] A binary value. Default is False. ; Return values .: True or False on errors ; Author ........: UEZ ; Modified ......: ; Remarks .......: All frames will be extracted whereas the filename will be <filename>_XX.<ext>. XX is the amount of frames. If ; $bReverse is set True then the frames will be saved in reverse order. If $iW and $iH are zero then no resizing will be done. ; Related .......: _GDIPlus_EncodersGetCLSID _GDIPlus_ParamInit _GDIPlus_BitmapCreateFromScan0 _GDIPlus_GraphicsSetInterpolationMode _GDIPlus_ImageSaveToFile ; Link ..........: ; =============================================================================================================================== Func _GDIPlus_GIFAnimExtractAllFrames($hImage, $sFilename, $iJPGQual = 85, $iW = 0, $iH = 0, $iResizeQual = 2, $bReverse = False) If $sFilename = "" Then Return SetError(1, @error, 0) Local Const $iAnimDimCount = _GDIPlus_GIFAnimGetFrameDimensionsCount($hImage) If @error Then Return SetError(2, @error, 0) Local Const $tGUID = _GDIPlus_GIFAnimGetFrameDimensionsList($hImage, $iAnimDimCount) If @error Then Return SetError(3, @error, 0) Local Const $iAnimFrameCount = _GDIPlus_GIFAnimGetFrameCount($hImage, $tGUID) If @error Then Return SetError(4, @error, 0) Local $sPath = StringRegExpReplace($sFilename, "(.+)\\.+", "$1") If StringLen($sPath) > 2 Then If Not FileExists($sPath) Then DirCreate($sPath) EndIf Local $sPrefixList = "jpg,png,bmp,gif,tif,", $sSuffix = StringRight($sFilename, 3) If Not StringInStr($sPrefixList, $sSuffix) Or StringMid($sFilename, StringLen($sFilename) - 3, 1) <> "." Then $sSuffix = "png" $sFilename &= ".png" EndIf Switch $sSuffix Case "jpg" Local $sCLSID = _GDIPlus_EncodersGetCLSID("JPG") Local $tParams = _GDIPlus_ParamInit(1) Local $tData = DllStructCreate("int Quality") Local $pData = DllStructGetPtr($tData) Local $pParams = DllStructGetPtr($tParams) $tData.Quality = $iJPGQual _GDIPlus_ParamAdd($tParams, $GDIP_EPGQUALITY, 1, $GDIP_EPTLONG, $pData) EndSwitch Local $sPrefix = StringTrimRight($sFilename, 4), $hFrame, $iCurrentFrame = 0, $i, $iRet, $hBitmap, $hGfx, $bError = False, $bResize = False If ($iW > 0) And ($iH > 0) And ($iW <> _GDIPlus_ImageGetWidth($hImage)) And ($iH <> _GDIPlus_ImageGetHeight($hImage)) Then $bResize = True $hBitmap = _GDIPlus_BitmapCreateFromScan0($iW, $iH) $hGfx = _GDIPlus_ImageGetGraphicsContext($hBitmap) _GDIPlus_GraphicsSetInterpolationMode($hGfx, $iResizeQual) EndIf Local $iFrame For $i = 0 To $iAnimFrameCount If $bReverse Then $iFrame = $iAnimFrameCount - $i Else $iFrame = $i EndIf _GDIPlus_GIFAnimSelectActiveFrame($hImage, $tGUID, $i) Switch $bResize Case False $hFrame = $hImage Case Else _GDIPlus_GraphicsClear($hGfx, 0x00000000) _GDIPlus_GraphicsDrawImageRect($hGfx, $hImage, 0, 0, $iW, $iH) $hFrame = $hBitmap EndSwitch Switch $sSuffix Case "jpg" $iRet = _GDIPlus_ImageSaveToFileEx($hFrame, $sPrefix & "_" & StringFormat("%0" & StringLen(Int($iAnimFrameCount)) & "i." & $sSuffix, $iFrame), $sCLSID, $pParams) If Not $iRet Then $bError = True Case Else $iRet = _GDIPlus_ImageSaveToFile($hFrame, $sPrefix & "_" & StringFormat("%0" & StringLen(Int($iAnimFrameCount)) & "i." & $sSuffix, $iFrame)) If Not $iRet Then $bError = True EndSwitch Next If $bResize Then _GDIPlus_GraphicsDispose($hGfx) _GDIPlus_BitmapDispose($hBitmap) EndIf Return $bError EndFunc ;==>_GDIPlus_GIFAnimExtractAllFrames ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_GIFAnimCreateFile ; Description ...: Creates a GIF animation file ; Syntax ........: _GDIPlus_GIFAnimCreateFile($aImages, $sFilename[, $iDelay = 100]) ; Parameters ....: $aImages - An array of image handles (animation frames). ; $sFilename - The filename of the GIF animation. ; $iDelay - [optional] An integer value. Default is 100 ms per frame. ; Return values .: True or False on errors ; Author ........: UEZ ; Modified ......: ; Remarks .......: Vista or a higher operating system is required to create a GIF animation! ; Related .......: _GDIPlus_EncodersGetCLSID _GDIPlus_ParamInit _GDIPlus_ParamAdd _GDIPlus_ImageSaveToFileEx ; Link ..........: ; =============================================================================================================================== Func _GDIPlus_GIFAnimCreateFile($aImages, $sFilename, $iDelay = 100) Local Const $GDIP_EVTFrameDimensionTime = 21 Local $sCLSID = _GDIPlus_EncodersGetCLSID("GIF") Local $tMultiFrameParam = DllStructCreate("int;") DllStructSetData($tMultiFrameParam, 1, $GDIP_EVTMULTIFRAME) Local $tParams = _GDIPlus_ParamInit(1) _GDIPlus_ParamAdd($tParams, $GDIP_EPGSAVEFLAG, 1, $GDIP_EPTLONG, DllStructGetPtr($tMultiFrameParam)) Local $hStream = _WinAPI_CreateStreamOnHGlobal() Local $tGUID = _WinAPI_GUIDFromString($sCLSID) _GDIPlus_ImageSaveToStream($aImages[1], $hStream, DllStructGetPtr($tGUID), DllStructGetPtr($tParams)) DllStructSetData($tMultiFrameParam, 1, $GDIP_EVTFrameDimensionTime) $tParams = _GDIPlus_ParamInit(1) _GDIPlus_ParamAdd($tParams, $GDIP_EPGSAVEFLAG, 1, $GDIP_EPTLONG, DllStructGetPtr($tMultiFrameParam)) Local $i For $i = 2 To $aImages[0] - 1 _GDIPlus_ImageSaveAddImage($aImages[1], $aImages[$i], $tParams) Next DllStructSetData($tParams, 1, $GDIP_EVTLASTFRAME) $tParams = _GDIPlus_ParamInit(1) _GDIPlus_ParamAdd($tParams, $GDIP_EPGSAVEFLAG, 1, $GDIP_EPTLONG, DllStructGetPtr($tMultiFrameParam)) _GDIPlus_ImageSaveAddImage($aImages[1], $aImages[$i], $tParams) DllStructSetData($tParams, 1, $GDIP_EVTFLUSH) $tParams = _GDIPlus_ParamInit(1) _GDIPlus_ParamAdd($tParams, $GDIP_EPGSAVEFLAG, 1, $GDIP_EPTLONG, DllStructGetPtr($tMultiFrameParam)) _GDIPlus_ImageSaveAdd($aImages[$i], $tParams) Local $hMemory = _WinAPI_GetHGlobalFromStream($hStream) Local $iMemSize = _MemGlobalSize($hMemory) Local $pMem = _MemGlobalLock($hMemory) Local $tData = DllStructCreate("byte[" & $iMemSize & "]", $pMem) Local $bData = DllStructGetData($tData, 1) _WinAPI_ReleaseStream($hStream) _MemGlobalFree($hMemory) $bData = StringRegExpReplace($bData, "(?i)(0021F904[[:xdigit:]]{2})[[:xdigit:]]{4}", "${1}" & StringRegExpReplace(Hex(Int($iDelay / 10), 4), "([[:xdigit:]]{2})([[:xdigit:]]{2})", "$2$1")) Local $iExtended = @extended Local $hFile = FileOpen($sFilename, 2) If @error Then Return SetError(2, 0, False) FileWrite($hFile, Binary($bData)) FileClose($hFile) If Not $iExtended Then Return SetError(1, 0, False) Return SetExtended($iExtended, True) EndFunc ;==>_GDIPlus_GIFAnimCreateFile Func _GDIPlus_GIFAnimCreateFileFromImageFiles($aFrames, $sGIFFileName, $bReplay = True) Local $tagGIFHeader = "byte Header[6];byte Width[2];byte Height[2];byte PackedField[1];byte BackgroundColorIndex[1];byte PixelAspectRatio[1];" Local $tGIFHeader_1frame = DllStructCreate($tagGIFHeader & "byte ColorTable[768];") Local $hFile = _WinAPI_CreateFile($aFrames[0][0], 2, 2), $nBytes _WinAPI_ReadFile($hFile, DllStructGetPtr($tGIFHeader_1frame), DllStructGetSize($tGIFHeader_1frame), $nBytes) _WinAPI_CloseHandle($hFile) Local $iColorTableSize = 3 * 2 ^ (BitAND($tGIFHeader_1frame.PackedField, 7) + 1) Local $tGIFHeader_File = DllStructCreate($tagGIFHeader & "byte ColorTable[" & $iColorTableSize & "];byte ApplicationBlockExtension[18]") $tGIFHeader_File.Header = $tGIFHeader_1frame.Header $tGIFHeader_File.Width = $tGIFHeader_1frame.Width $tGIFHeader_File.Height = $tGIFHeader_1frame.Height $tGIFHeader_File.PackedField = $tGIFHeader_1frame.PackedField $tGIFHeader_File.BackgroundColorIndex = $tGIFHeader_1frame.BackgroundColorIndex $tGIFHeader_File.PixelAspectRatio = $tGIFHeader_1frame.PixelAspectRatio $tGIFHeader_File.ColorTable = BinaryMid($tGIFHeader_1frame.ColorTable, 1, $iColorTableSize) $tGIFHeader_File.ApplicationBlockExtension = Binary("0x21FF0B4E45545343415045322E3003010000") Local $bGIFHeader, $i, $b, $p, $d For $i = 1 To 8 $bGIFHeader &= StringTrimLeft(DllStructGetData($tGIFHeader_File, $i), 2) Next For $i = 0 To UBound($aFrames) - 1 $b = Binary(FileRead($aFrames[$i][0])) $p = Floor(StringInStr($b, "0021F904") / 2) $d = Hex(Dec($aFrames[$i][1] / 10), 4) If Not $p Then ContinueLoop $bGIFHeader &= StringMid(StringRegExpReplace(BinaryMid($b, $p, BinaryLen($b) - $p - 1), "(?i)0021F904([[:xdigit:]]{2})([[:xdigit:]]{4})(.*)", "0021F904${1}" & StringRight($d, 2) & StringLeft($d, 2) & "$3"), 3) Next $hFile = FileOpen($sGIFFileName, 18) FileWrite($hFile, Binary("0x" & $bGIFHeader & "3B")) FileClose($hFile) EndFunc ;==>_GDIPlus_GIFAnimCreateFileFromImageFiles ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_BitmapConvertTo8Bit ; Description ...: Converts a bitmap to a 8-bit image ; Syntax ........: _GDIPlus_BitmapConvertTo8Bit(Byref $hBitmap[, $iColorCount = 253[,$iDitherType = $GDIP_DitherTypeDualSpiral8x8[, ; $iPaletteType = $GDIP_PaletteTypeFixedHalftone252,[$bUseTransparentColor = True]]]]) ; Parameters ....: $hBitmap - A handle to an image / bitmap object ; $iColorCount - [optional] An integer value. Default is 253. ; $iDitherType - [optional] An integer value. Default is $GDIP_DitherTypeDualSpiral8x8. -> http://msdn.microsoft.com/en-us/library/ms534106(v=vs.85).aspx ; $iPaletteType - [optional] An integer value. Default is $GDIP_PaletteTypeFixedHalftone252 . -> http://msdn.microsoft.com/en-us/library/ms534159(v=vs.85).aspx ; $bUseTransparentColor - [optional] A binary value. Default is True. ; Return values .: True or False on errors ; Author ........: UEZ ; Modified ......: ; Remarks .......: Vista or a higher operating system is required ; Related .......: _GDIPlus_PaletteInitialize _GDIPlus_BitmapConvertFormat _GDIPlus_ImageLoadFromFile _GDIPlus_BitmapCreateFromScan0 ; Link ..........: http://msdn.microsoft.com/en-us/library/windows/desktop/ms534106(v=vs.85).aspx) ; =============================================================================================================================== Func _GDIPlus_BitmapConvertTo8Bit(ByRef $hBitmap, $iColorCount = 256, $iDitherType = $GDIP_DitherTypeDualSpiral8x8, $iPaletteType = $GDIP_PaletteTypeFixedHalftone252, $bUseTransparentColor = True) $iColorCount = ($iColorCount > 2 ^ 8) ? 2 ^ 8 : $iColorCount Local $tPalette = _GDIPlus_PaletteInitialize(256, $iPaletteType, $iColorCount, $bUseTransparentColor, $hBitmap) If @error Then Return SetError(1, @error, 0) Local $iRet = _GDIPlus_BitmapConvertFormat($hBitmap, $GDIP_PXF08INDEXED, $iDitherType, $iPaletteType, $tPalette) If @error Then Return SetError(2, @error, 0) Return $iRet EndFunc ;==>_GDIPlus_BitmapConvertTo8Bit Func _GDIPlus_BitmapConvertToXBit(ByRef $hBitmap, $iColorCount = 16, $iPixelFormat = $GDIP_PXF04INDEXED, $iDitherType = $GDIP_DitherTypeDualSpiral8x8, $iPaletteType = $GDIP_PaletteTypeFixedHalftone252, $bUseTransparentColor = False) Switch $iPixelFormat Case $GDIP_PXF08INDEXED $iColorCount = ($iColorCount > 2 ^ 8) ? 2 ^ 8 : $iColorCount Case $GDIP_PXF04INDEXED $iColorCount = ($iColorCount > 2 ^ 4) ? 2 ^ 4 : $iColorCount Case $GDIP_PXF01INDEXED $iPaletteType = $GDIP_PaletteTypeFixedBW $iColorCount = 2 Case Else $iPixelFormat = $GDIP_PXF04INDEXED $iColorCount = 16 $iDitherType = $GDIP_DitherTypeDualSpiral8x8 $iPaletteType = $GDIP_PaletteTypeFixedHalftone252 EndSwitch Local $tPalette = _GDIPlus_PaletteInitialize(256, $iPaletteType, $iColorCount, $bUseTransparentColor, $hBitmap) If @error Then Return SetError(1, @error, 0) Local $iRet = _GDIPlus_BitmapConvertFormat($hBitmap, $iPixelFormat, $iDitherType, $iPaletteType, $tPalette) If @error Then Return SetError(2, @error, 0) Return $iRet EndFunc ;==>_GDIPlus_BitmapConvertToXBit Func _GDIPlus_ImageGetColorPalette($hImage, ByRef $tColorPalette, $iSize) Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetImagePalette", "handle", $hImage, "struct*", $tColorPalette, "uint", $iSize) If @error Then Return SetError(@error, @extended, 0) If $aResult[0] Then Return SetError(10, $aResult[0], 0) Return True EndFunc ;==>_GDIPlus_ImageGetColorPalette Func _GDIPlus_ImageGetColorPaletteSize($hImage) Local $aResult = DllCall($__g_hGDIPDll, "uint", "GdipGetImagePaletteSize", "handle", $hImage, "uint*", 0) If @error Then Return SetError(@error, @extended, 0) If $aResult[0] Then Return SetError(10, $aResult[0], 0) Return $aResult[2] EndFunc ;==>_GDIPlus_ImageGetColorPaletteSize ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_ImageGetPropertyItem ; Description ...: Gets a specified property item (piece of metadata) from this Image object. ; Syntax ........: __GDIPlus_ImageGetPropertyItem($hImage, $iPropID) ; Parameters ....: $hImage - A handle to an image object. ; $iPropID - An integer that identifies the property item to be retrieved. ; Return values .: $tagGDIPPROPERTYITEM structure or 0 on errors ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: _GDIPlus_ImageLoadFromFile _GDIPlus_ImageLoadFromStream ; Link ..........: Property Item Descriptions -> http://msdn.microsoft.com/en-us/library/windows/desktop/ms534416(v=vs.85).aspx ; =============================================================================================================================== Func __GDIPlus_ImageGetPropertyItem($hImage, $iPropID) Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetPropertyItemSize", "handle", $hImage, "uint", $iPropID, "ulong*", 0) If @error Then Return SetError(@error, @extended, 0) If $aResult[0] Then Return SetError(10, $aResult[0], 0) Local Static $tBuffer ;why static? because otherwise it would crash when running it as x64 exe (workaround) $tBuffer = DllStructCreate("byte[" & $aResult[3] & "]") $aResult = DllCall($__g_hGDIPDll, "int", "GdipGetPropertyItem", "handle", $hImage, "uint", $iPropID, "ulong", $aResult[3], "struct*", $tBuffer) If @error Then Return SetError(@error, @extended, 0) If $aResult[0] Then Return SetError(11, $aResult[0], 0) Local Const $tagGDIPPROPERTYITEM = "uint id;ulong length;word type;ptr value" Local $tPropertyItem = DllStructCreate($tagGDIPPROPERTYITEM, DllStructGetPtr($tBuffer)) If @error Then Return SetError(20, $aResult[0], 0) Return $tPropertyItem EndFunc ;==>__GDIPlus_ImageGetPropertyItem ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_ImageSaveAddImage ; Description ...: Adds a frame to a file or stream specified in a previous call to the _GDIP_SaveImageToFile or _GDIP_SaveImageToStream functions. ; Syntax ........: _GDIPlus_ImageSaveAddImage($hImage, $hImageFrame, $tParams) ; Parameters ....: $hImage - A handle to an image object. ; $hImageFrame - A handle to an image object that holds the frame to be added. ; $tParams - A dll struct to an EncoderParameters structure that holds parameters required by the image encoder ; used by the save-add operation. ; Return values .: True or False on errors ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: _GDIPlus_ImageSaveAdd _GDIPlus_ParamInit _GDIP_SaveImageToFile _GDIP_SaveImageToStream _GDIPlus_ImageLoadFromFile _GDIPlus_BitmapCreateFromScan0 ; =============================================================================================================================== ;~ Func _GDIPlus_ImageSaveAddImage($hImage, $hImageFrame, $tParams) ;~ Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSaveAddImage", "handle", $hImage, "handle", $hImageFrame, "struct*", $tParams) ;~ If @error Then Return SetError(@error, @extended, False) ;~ If $aResult[0] Then Return SetError(10, $aResult[0], False) ;~ Return True ;~ EndFunc ;==>_GDIPlus_ImageSaveAddImage ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GDIPlus_ImageSaveAdd ; Description ...: Adds a frame to a file or stream specified in a previous call to the _GDIP_SaveImageToFile or _GDIP_SaveImageToStream functions. ; Use this method to save selected frames from a multiple-frame image to another multiple-frame image. ; Syntax ........: _GDIPlus_ImageSaveAdd($hImage, $tParams) ; Parameters ....: $hImage - A handle to an image object. ; $tParams - A dll struct to a encoder parameter list structure ($tagGDIPENCODERPARAMS). ; Return values .: True or False on errors ; Author ........: UEZ ; Modified ......: ; Remarks .......: ; Related .......: _GDIP_SaveImageToFile _GDIP_SaveImageToStream _GDIPlus_ParamInit _GDIPlus_ImageLoadFromFile _GDIPlus_BitmapCreateFromScan0 ; =============================================================================================================================== ;~ Func _GDIPlus_ImageSaveAdd($hImage, $tParams) ;~ Local $aResult ;~ $aResult = DllCall($__g_hGDIPDll, "int", "GdipSaveAdd", "handle", $hImage, "struct*", $tParams) ;~ If @error Then Return SetError(@error, @extended, False) ;~ If $aResult[0] Then Return SetError(10, $aResult[0], False) ;~ Return True ;~ EndFunc ;==>_GDIPlus_ImageSaveAdd1 point
-
This might help you: #include <GDIplus.au3> #include <GUIConstantsEx.au3> #Include <Memory.au3> _GDIPlus_Startup() Local $hImage = Load_BMP_From_Mem(Background_PIC()) Local $iX = _GDIPlus_ImageGetWidth($hImage) Local $iY = _GDIPlus_ImageGetHeight($hImage) Local $hWnd = GUICreate("Display image from memory by UEZ 2010", $iX, $iY) GUISetState(@SW_SHOW) Local $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hWnd) _GDIPlus_GraphicsDrawImageRect ($hGraphics, $hImage, 0, 0, $iX, $iY);copy bitmap to GUI GUISetState() GUIRegisterMsg(0x0014, "WM_ERASEBKGND") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE _GDIPlus_ImageDispose($hImage) _GDIPlus_GraphicsDispose($hGraphics) _GDIPlus_Shutdown() GUIDelete($hWnd) Exit EndSwitch WEnd Func WM_ERASEBKGND($hWnd, $uMsgm, $wParam, $lParam) _GDIPlus_GraphicsDrawImageRect ($hGraphics, $hImage, 0, 0, $iX, $iY) Return True EndFunc ;==>WM_ERASEBKGND ;====================================================================================== ; Function Name: Load_BMP_From_Mem ; Description: Loads a image which is saved as a binary string and converts it to a bitmap or hbitmap ; ; Parameters: $mem_image: the binary string which contains any valid image which is supported by GDI+ ; Optional: $hHBITMAP: if false a bitmap will be created, if true a hbitmap will be created ; ; Remark: hbitmap format is used generally for GUI internal images ; ; Requirement(s): GDIPlus.au3, Memory.au3 ; Return Value(s): Success: handle to bitmap or hbitmap, Error: 0 ; Error codes: 1: $mem_image is not a binary string ; ; Author(s): UEZ ; Additional Code: thanks to progandy for the MemGlobalAlloc and tVARIANT lines ; Version: v0.95 Build 2011-06-11 Beta ;======================================================================================= Func Load_BMP_From_Mem($mem_image, $hHBITMAP = False) If Not IsBinary($mem_image) Then Return SetError(1, 0, 0) Local $declared = True If Not $ghGDIPDll Then _GDIPlus_Startup() $declared = False EndIf Local Const $memBitmap = Binary($mem_image) ;load image saved in variable (memory) and convert it to binary Local Const $len = BinaryLen($memBitmap) ;get length of image Local Const $hData = _MemGlobalAlloc($len, $GMEM_MOVEABLE) ;allocates movable memory ($GMEM_MOVEABLE = 0x0002) Local Const $pData = _MemGlobalLock($hData) ;translate the handle into a pointer Local $tMem = DllStructCreate("byte[" & $len & "]", $pData) ;create struct DllStructSetData($tMem, 1, $memBitmap) ;fill struct with image data _MemGlobalUnlock($hData) ;decrements the lock count associated with a memory object that was allocated with GMEM_MOVEABLE Local $hStream = DllCall("ole32.dll", "int", "CreateStreamOnHGlobal", "handle", $pData, "int", True, "ptr*", 0) $hStream = $hStream[3] Local $hBitmap = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromStream", "ptr", $hStream, "int*", 0) ;Creates a Bitmap object based on an IStream COM interface $hBitmap = $hBitmap[2] Local Const $tVARIANT = DllStructCreate("word vt;word r1;word r2;word r3;ptr data; ptr") DllCall("oleaut32.dll", "long", "DispCallFunc", "ptr", $hStream, "dword", 8 + 8 * @AutoItX64, _ "dword", 4, "dword", 23, "dword", 0, "ptr", 0, "ptr", 0, "ptr", DllStructGetPtr($tVARIANT)) ;release memory from $hStream to avoid memory leak $tMem = 0 If $hHBITMAP Then Local Const $hHBmp = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap) _GDIPlus_BitmapDispose($hBitmap) If Not $declared Then _GDIPlus_Shutdown() Return $hHBmp EndIf If Not $declared Then _GDIPlus_Shutdown() Return $hBitmap EndFunc ;==>Load_BMP_From_Mem Func Background_PIC() Local $bitmap_data = '0xFFD8FFE000104A46494600010101004800480000FFDB004300191113161310191614161C1B191E253E29252222254C373A2D3E5A505F5E595057566470907A646A886C56577DAA7E889499A1A2A161' $bitmap_data &= '78B0BDAF9CBB909EA19AFFDB0043011B1C1C252125492929499A6757679A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9AFF' $bitmap_data &= 'C0001108015C016003012200021101031101FFC4001F0000010501010101010100000000000000000102030405060708090A0BFFC400B5100002010303020403050504040000017D0102030004110512' $bitmap_data &= '2131410613516107227114328191A1082342B1C11552D1F02433627282090A161718191A25262728292A3435363738393A434445464748494A535455565758595A636465666768696A73747576777879' $bitmap_data &= '7A838485868788898A92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC4001F0100' $bitmap_data &= '030101010101010101010000000000000102030405060708090A0BFFC400B51100020102040403040705040400010277000102031104052131061241510761711322328108144291A1B1C109233352F0' $bitmap_data &= '156272D10A162434E125F11718191A262728292A35363738393A434445464748494A535455565758595A636465666768696A737475767778797A82838485868788898A92939495969798999AA2A3A4A5' $bitmap_data &= 'A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE2E3E4E5E6E7E8E9EAF2F3F4F5F6F7F8F9FAFFDA000C03010002110311003F00EA68A28A004A28A2800A28A2800A5A4A' $bitmap_data &= '5A0028A28A004A28A2800A28240EA69BBFD066801D41351EE27BFE5556FAF61B180CB3B703A0EEC7B01401667B986DE26965915235EAC7A5625C78AEDD09104124A47F788407F99AE7B53D4E7D465DD2' $bitmap_data &= '9DB1A9F9630785FF001354A803725F14DFB83E5A4318F50A49AAAFAFEA8DD6E88FF763518FD2B368A00BA757D44FFCBECDF9D31B53BF63CDEDC7E0E4555A075A00B6BA95F29E2F2E3FEFE1353C7AE6A7' $bitmap_data &= '19C2DDB30FF69437F4ACEA2803723F146A083E7481FEA841FE75761F16A9C09ECD87A98DF3FA1C572FC7B51C1A00EE6D35FB0BB2144A6273D1651B73F8F4FD6B4B7003920579A62B474DD66EEC18287F' $bitmap_data &= '361EF1BFF43401DDD15474FBF86FE1F36DDC823EF23755356BCDC1C30FCA8024A2915837439A5A0028A28A005A28A2800A4A5A4A0028A28A0028A28A005A28A2800A28A280128A28A0028A28A0029692' $bitmap_data &= '96800A2929ACDD875A0071200E698589E9C52753CD18A004C7AF34BDA8FD4D183DFF004A00648E11493FCEB94D512E754BD6F223792388EC1B06467B9CD758D1238C32823DEA1FB05991836B0919CE0A' $bitmap_data &= 'E6803935F0EEA2DFF2EEA31EB22FF8D35F41D453ADA93D7EEB03FD6BAB3A5D8B74B645FF00772BFCA9A74E8F9F26E6EA127AEC9B3FCF3401C54D657101C4B04A9F55355F83DFF5AEF0C1A8A488D1DEAC' $bitmap_data &= '88A0FEEE48F696FA919FE5542E4DC04C5DE8D14E0B75800231FCF3401C9E3EB4015B922685712948DE7B66E9B88F941F7CD6348BE5BB28656C7F129C834806D1467D28CD300E28E0D3A18659DF6428D2' $bitmap_data &= '31E81466B52DFC397F2E0C8A9003FDF6E7F21401918EB4B9E3AD7556DE17B440A6E659256EA557E51FE35A7058DA5B0FDC5B4687D76E4FE668038ED3E5BBB5B84B8B68A4623A8542430F4E95DBC122DD' $bitmap_data &= '40B22065DC39561823EB4E2EDEA69849EB9A000A9539FE54E595875E6981A918D005A4915FA1E7D29D54B383FD6A549F1C3F23D6802CD1480E46472296800A4A5A4A0028A28A0028A28A005A28A2800A' $bitmap_data &= '28A280128A28A0028A28A0028E9413819351925B9ED400A589E9D29296933D81E7F41400BD3AD2633D7F2A31F9D2D001DA92968C134009453B6FA9A5C0A00652F3EF4EA280198F6A4E8734FA69EB4015' $bitmap_data &= '6EECADAED4ADCC0AD9EA7186FCEB9DD43C392C21A4B3732A01928DF787F8D755D3A5318E07F9E2901C3D969B757EE5204FBBC3337017EBFE15D1D97872CE001AE337127BF0A3E83BD6BC0010C400096C' $bitmap_data &= '9C0EA6949A602468912EC891635FEEAA8028CD19A4CD002E69B45266800348682690D001466933499A0043D699BB1F5F4A71A8DA80268E5287E53F81AB71CAB20E3AFA5660247B9A9164C1C838228034' $bitmap_data &= 'A8A861B80FF2B70DFCEA6A0028A28A0028A28A005A28A2800A28A280128A28A00290900734A4E064D46492727F0A0009C9E68A290B7200EA68017D875EFED4A38A4030296800A0734019A7018A004005' $bitmap_data &= '2D2D2500145149400B4945140013519A731A650014C90E14D3B3514BF74F7A0096D8E54FD694D36D0E51B9CF3413400519A4CD266801690D266933400B9A69A0D25002D349A0D21A0009A6B52D34D003' $bitmap_data &= '0D3738A7B546C2901223E78EF572DEE338473F43594CE55B1F954B1CCADD68036851556DA7FE073F4356A98051451400B451450025145140051453246C0C7734008CD93EC2A392548C12C6B3B53D5A1B' $bitmap_data &= '31B3EF49FDD1D6B98BDD42E2F09DEF84FEE2F02803A4BBD76DA2C8594337A20DD8AB9A64C6EA13704150C70A1860815CB6856AB7178C6540F1428CECBD89ED9AEAF4C4D9A6DB0F540C7F1E6802D5039A' $bitmap_data &= '29C06280140C51451400514525001451484E2800CD2134D249A4CD0004D2134526680026A298FCA79C53F3514C7E5340135A1FDD367D683D6996847932633D7BD29340066933452668016928CD250019' $bitmap_data &= 'A4CD04D26680026909A334D2680026909A0D3734800D34D2E6909A0086E14B44C17EF8195FC2B2A1D4A39387055BB8F4AD763DC76AE5F518FCABE9D40C0DD91F43CD0074305D74C36E5FD7F0ADAB2B95' $bitmap_data &= '9D319F997D6B82B7B97881C1CE3A035B7A7DFF009843C6C43AF634C475945456F309E1590719EA3D0D4B40C28A28A0028A28A004AC6D7B5316716C8F99DFF415A97532C10B3B1E00AE0AF6E5AEAE5E67' $bitmap_data &= 'E72703DA9010BBB3B16624B1E49A6FB504D14C0DDD1008B48D4AE09DA4AEC0C3E9DABA5B65D96F120FE1451F4E2B06C832F852520A02DB8E5BA01915D12741F4140878E296928A061451450019A2929A' $bitmap_data &= 'CD8A0052D8A613413494001A292933400A4D349A290D00213504EDF29A748E14735427B9C920520346CDB30C9FEFFF004A79AA56170A44B1EE059581C679E9570734C029294D21340099A4CD04D25000' $bitmap_data &= '4D26683484D0019A426909A69348009A6934134DCD002E6933484D26680063581ADA62ED5FB3A0FD38ADD26B1F5D19F25BEA28032475FD2A4B694C1306EDD0D4541E4FE14C0ECF46BEC3181CFCAE728C' $bitmap_data &= '7D6B72B86D3A6DF1019C3271FE15D7E9F73F6980163F3AF0DFE3408B545145030A28A64AC1509F419A00E7FC5179B631021E5BAD72E6AE6AB706E6FA47CE40F94552A402D349A5349D2981D4C40A785B' $bitmap_data &= '0BB49F2F71CF41CD6EC4D98D0E7AA839FC2B96B7B9497C377313E4B4202E07A6783F4AE8AC641258DBB7AC4BFCA8116B70A5A652838A063A8A2909A00466C5333413CD25001499A33499A005CD2519A6' $bitmap_data &= '3B851C9A0071200AAB7174B1E7904D55BBBE0AA483C0EF59E77CEA6792516F6C33995FF88FA28EE695C092E2F4BB84505D9B85451924D56BC5FB3A117739597A8822C17FF811E82ABCDA90855A2D3A33' $bitmap_data &= '02918695B995C7B9FE1FC2B349CD005A86F64864F3136E4F5DDCE6B5ED35A121559015909C63A2D73B4B9A6076E97432AAC4063C6323FCF6A977822B8DB5BD92D81002B29209C8E98F4ADCB4BF591771' $bitmap_data &= '753C0620751CE31401AD9A4CD4492065073D69D9A40389A6934134D2680149A693484D21340013484D14C2680149A4CD25266800CD65EB7FEA61FF007CFF002AD326B2B5C384817D4B1FE5480C8A0D14' $bitmap_data &= '7639AA027B297CAB85CF46F94D74FA5DC7952A9FE13C115C88EA2B7EC65CAA93F43408EC0515574F94CB6E013F32F06AD50303D2B375BB9F22CA420F27815A24E0126B97F144E7747083D064D26073C4' $bitmap_data &= 'D3694D211C50021A4CD21A298134170F0A4A8A7E49576B0AEB3C3B7225D2D10FDE898A91E80F23F9D71C0648007278E2BADD0348B8B4065B8936190730819FA13E86811B218519A6B5BB0FBAC3F1A8CA' $bitmap_data &= 'CA9D54E3DB9A064E1A94B66AAF9D86C1EA3B5384C0D004A69A4D37CC1EB4D2E2801F9A3351EF1EB55E7B908081D690134B3AC6BC91593777C4B8450CCCFC2AA8C926A296792E6468A1DA580CB3B1C246' $bitmap_data &= '3D58D519B505B60D1D83B348DC4976C30CC3D17FBA3F5340135C3C564CC6EB6CF720E45B86F9233FED91D4FB0ACBBBBB9EF24DF3C85881851D028F403B5419A298051451400514514005490CD2432078' $bitmap_data &= 'DB0C3DB351D1401B363A86E28B2300C0818C76AD68AE15C641AE47A55DB6BF78F89373003822803A6DD49BAA9C574AE3860DEEBEF536EA404D486981A82F8A007134D269A589E9460E32680173494D32' $bitmap_data &= '46A46581CF4C734D12B3FF00AB898F3DE801E47358BADCA1AE5631FF002CD79FA9AD9D9707925107A561EA163342CD2B9F3158E4B8EC7DC50053C700D21E45283918A3BD30183AD6AD84986DA7BD65E3' $bitmap_data &= '9AB70BF96EADE87F4A04759A54BB650A4F0E31F8D6C0AE6AD64DA432F51C8AE91486504743C8A006CA7803D6B87D726F375190E720715DA4EDCB63F856B80BC7DF732B7AB5219075A1A81DE90D301297' $bitmap_data &= 'FA5256EF86F4C1712FDAE750618CE1148FBEDFE02802FF0087B4816EAB7972BFBE6198D0FF0000F53EFF00CAB709A4272793CD1400BB8FAD2F98477A6526680242C8E0875073D6A26B7858E412BEC0F1' $bitmap_data &= '4669A4D0044D6B328F94AC9CFF000F155A46647D8D956F46E0D5DDE45299372E1802BEFCD20335E560A7B71D735917776245DC1D92107EF8EAC7D17FC6AE6B76C00F32157DAC312053C01F8D73B24B24' $bitmap_data &= '857CC6276A851EC3D2840493DCB489E527C90839080F7F53EA6A0CD2514C028A28A0028A28A0028A28A0028A28A0028A28A009A199E13F21E3392A2B66CAED675C67E6CF4C5608EB562CB719D0062371' $bitmap_data &= '00E0E0F5A00E84B0519770A3DE9AB32BB01123CBEE0607E75716D2DA01911EE3EB21DC69249CF41C0F6E29015C4772E08212204F07A9A3ECE9BB3248CC7183CF14A589EB462801CAB1A0C24629779E94' $bitmap_data &= 'D145002E49A6E3D4641EA0F7A5A290187A9597D9D84B08FDD31E47F74FA7D2A89E79AEA2445746561956186AE76EED9AD6731B72BFC27D453021C6483528E7BD442A45A00DAD3A4DF146D9E7A1AE9EC1' $bitmap_data &= 'F75AA0FEEFCB5C7E96F82E9E8435751A53F0E99EC1BFA1A621D74F88266FF64D704E7249F539AEFA48BCE8DE3E9B948AE065431C8D1B70C84823D297518DA4A28C64F14C0B16166F7D771DBA7058FCC7' $bitmap_data &= 'D07735DDC512410AC310C471A8551E9FFEBACCF0ED87D92CBCE7044B380707AAAF61FD6B5280173499A4A280149A6D1494001A69A53486801B4529A69A00A3A9A892DD9480723BD720C3048F438AEDAE' $bitmap_data &= '40DB9AE46FA3F2EE9C6EDD9E7E99A5D40AD45145300A28A2800A28A2800A28A2800A28A2800A28A2801455DD2D37DE4791900F41D6A956BE891E58C98E0753401B5339CE2A0EF4AC7269290052D14500' $bitmap_data &= '28A2814B400514514000AA9A85A0B980851FBC4F993DFDAAE521F51D7B5007298F51834F43C55DD5AD7CA9C4A8BF24BC9F635453D2802EE9ED8B9C7AAD74DA5BE2751FDE523FAD72B6876DD467EA2BA3' $bitmap_data &= 'B06DB24593F30607F034C46BA706B9DF12E944B1BDB75CE7FD6281FAD7424E0FE74EE19707A1A433CE2B4345B1FB6DEA2B7FAB1F331F615B1A9E8311633428C0756541FD2AC6836E21B79A5DB8323EC0' $bitmap_data &= '08C7CABFFD7A00D42727A63D3E9494525300A28A4A0033499A0D14001A6D29A6D001484D04D349A4032519435CCEB31E25570A391F330CF35D33F4AC6D6220D6EC4E46DF9B8E9401CF9A28228A601451' $bitmap_data &= '4500145145001451450014514500145145002A825801D4FAD745A747E5DB673C91587671EF980C1247207AD74A06C8C28E31498094528A290052D252D30014EC52014B4005145140051DA9690D004375' $bitmap_data &= '00B9B778BB9E87DFB573A8B899011804E315D45635FC18D464551F7B0EBC7AFF00FAA80086054B8DED8DABFCEB5B4F04CBBDBBE3354E0809F99B9FAD6ADAA6D03EB401A2DD7F1340349270C7EB40A604' $bitmap_data &= '81B14D3CF3499A40722800A6D29A4A00293345250014526683400669A4D0690D2010D21A09A69340086AA5D2074208E0F635689A864E45007253218E4652307351D5FD5A211CC1C646EED54284014514' $bitmap_data &= '5300A28A2800A28A2800A28A2800A28A5419603D7F1A00D5D2203BB7118EFD3922B58F26AB584423806076C67D6ACD20168A05140052D145000296814B40094B4B450025069692800A8A640D306E33B4' $bitmap_data &= '7352F6A6B60C9F402801635C2D5A88722A2030A054D08CB2FD45005D9C61CFE7518353CE3907F0AAE2980ECD229EBF5A334D0793400E269282692800A4A2933400521345252002690D1484F3400869A6' $bitmap_data &= '94D30D0006A37A79A635203335588BDBB1032579AC1652A706BAB9577020D61DD5B796F870DB3F85BA91EDF4A680CFA2A53037F0B2B7D0D37C993FB86980CA29DE549FDC6A3CA7FEE3500368A779727F' $bitmap_data &= '71BF2A3CA7FEE1A006D14FF264FEE9A5F25BB951F534011D5BB188BCC0601C0CF350848D7AB827D056B6956E42798DD58E47B52034546140A5C52E3BD1400514B4500252D14B40094EA414B400514B45' $bitmap_data &= '002514B450020148012E73DCF14E240524D118C01ED40121FBD562D5732A8FC6ABA8E6AED92E5C9F414016A55CA1F51551B8E6AF5549170C57F114C06669A4E0D2D358F1C50038D25267201A33480292' $bitmap_data &= '8A4A002928A4340052134521A00434DA5A4A00434D6A71A6E371A4033031963851C9345B44ACAD348832FF002A83D97FC69251E6B88547CA396352B37181D2802ACDA65A4849F2C29FF64E2AAB68F076' $bitmap_data &= '661F8D68939A4A00CD3A447FDF7FCE90E9098E5DBF3E2B4FF1A314019474A4FEFBFE747F64C7FDE6FCEB57146D140197FD9317707FEFAA51A5C23F801FA9AD4DA28DA28033858423AC4B562D87927CA3' $bitmap_data &= '8F2CFDC6F7F4AB054531D01183D0D0038D14B192EA77637AF5F71EB4628012968C52814C04A2969714008052D18A5A004A29714B834009453B6D18A008DB3C0E307AD3D4714D037B939C8A9280154568' $bitmap_data &= 'D9AE22CFA9AA2832462B51142205F4A007543703A37E15353645DC8453029919A69538A7D21A00893BAFA73450DF2B6E14E201E477A40369297068C1A0069A434EC1A4C5003690D3F148680194869D8C' $bitmap_data &= 'D3483400D393D2891844B81F7DB81ED4F00202CC781EB512E6472E4E476C8C520045D8806724F5269314F3C9A4C5301B8A314EA4C52013146297145300A28A2800A2968C500252114EC518A40447E461' $bitmap_data &= '205CB0E2A665C8DC07069A47A8A21C29F289273C827F95300C52E38A7151462801B814EC514B40098A2968A0028A5A2801291B85CF7A7E29BD587A0A00455C0A70A5A5028027B44DD2E4F45E6B405416' $bitmap_data &= '91ED8B27AB7353D300A28A2802AC8BB5C8A8CD599D72B91D455734011B0E2A1699205CCAC1533F78F6A9DC71587E219088121504976E83BD2036CF63C63D41C83495C8DB6A37D61850C760E0238CAD6C' $bitmap_data &= 'DAEBF6D2AA8B856898F52395A606A521A22749937C2EB227F790E7F3A5348069A4A53494001A4C6697AD24ADB138FBCDC0E3A500452B6F608ADC0FBC29C13803B511AE17279CD3E801BB4526DA7D1401' $bitmap_data &= '1628C5494628023A29E4518A008F14629F8A5C5003314014FC52D003768A368A751400D22A3914FF0009C1EC6A6C52114008AE244DC33C75A314C04C7203C907822A62280194B4B8A4A0028A5C64FF00' $bitmap_data &= '414C9E586D941B8952207A6EEA7E82801F8A503A9E807527A0FAFA5654DAF40A316F1348DD32FC0ACAB9BFBABE0048C4A7FCF34181401D247730CE596070F8382454A38AE7B436315C946C2EEAE8B140' $bitmap_data &= '0952C51EF70BEBD698055DB48F0A5C8E4F02802C8000E28A28A6014514500155245DAD8EDDAADD3254DEBC751D28029B74AC7D51034EAC41250607B56D30E2B2B514F9F3480CC619041C63DEAB49671B' $bitmap_data &= 'F20153ED5708A6914C0CF58AE2DDF7C12B291D0A9C1AB916B7A8C231304987AC8B93F98E6948A6114017E1F115B380278248C9EA508603F3E6AE47A9E9F2FDDBB45FFAE8A56B05A356FBCA0FD4540D6C' $bitmap_data &= '87A023E86803AB37768ABB8DDDBE3DA414C8CF9C7CCDDB958654E3B572124463E7823D7D2BA9D1A713E9917768F31B0CFA74A405C3462968A004A4A7525002514B450025252E28A004A2971462800A4A' $bitmap_data &= '5A2800A28A5A004A4A5A2801ACB915564D4ADAD6430DC39565E985CD5C38032C70A3924F615C85DCE6EEF65957F8DB8FA76A00DF7D72C17EEB4B27B2A63F99AA72F884F482D80F432367F4AC91128FBD' $bitmap_data &= 'CD386074005005A9B56BF9F8127963182231B41AA62224E59B9F5EB9A7E4934E5E94008B12E7919FAD48050053C0A009EC062E91BA60E338AE857A561D821F3D48CFD456F01C5301F1465DC28FC6B400' $bitmap_data &= '00003A0A8ADE3D8BB8FDE6FD2A6A0028A28A0028A28A0028A28A00AF3260E4743FA5676A11E5738AD8650C083D0D67DD2B2828CA194F43DE8030DD6A32B57258F048A81969015D854647356196A365A6' $bitmap_data &= '0458A691C53C8A4229010BAE4608CE6A5D22EFEC379B2427ECF37CA4FA1EC6908CD4334618106981D6B0DA70692B3743BE33C5F6498E658972AC7F897FC4569E29005262968A004C514B450025262969' $bitmap_data &= '6801B8A2968A004A314B45002514B45002514B51CF3476F0BCD29C220C9F7A00CED76F3C8B7FB3C67F7930C37A85FF00EBD6122EC5ED93E94F9656B99DEE65FBEE7200EDE95196C9A0009A2929545003' $bitmap_data &= '8548A29AA2A55F619F7A005029E8B9342AE6ACC517E74C0B7A6C5FBC271D2B6EDE2DCD93F74553D3E07C15518CF2CC7B0F4AD7550A000381400B4514500145145002D14514009451450014D9103AE0D3' $bitmap_data &= 'A8A00CABAB6CE481CF7AA0F1E3208AE8648C38F7ACFB9B6CE481CD2032192A265ABB24646460D40C9401519698455965A89969810E29AC38A948A691480AF978A5496162B221DC86BA6B1BB8EFAD9668' $bitmap_data &= 'F83D1D7FBADDFF000AE7D973F8D259DD49617226505A338F313FBC3FC45303A8A292391268D6589B7C6C32A47A7F8D3B14804A4A751400DA314B45002514B45002514B45002514B8A314009DF18AE775' $bitmap_data &= '6BD17570628DB3045DC7476ABDAC5FF9486DA023CD71F3907EE0F4FAD603B050157A0A00491B2714CA4A5A00515228A6AAF4A9D138A600ABCD4E8849A58E227B55B8A1F6A006471D69D859991F2471F4' $bitmap_data &= 'A5B3B3691BA62B6A28D6240AA3FF00AF400B1A2C6A15474A7514500145145002D145140051451400945145001451450014D740C39A752D0067DC5B67B7E3542584A93906B78804608AAF35B06E833401' $bitmap_data &= '80E950B256B4F6C57240C8F4AA4F1E33C52028B2D308F6AB4E9CD42CB40109151BA835330A610698126977E6C2529264DB391B80E761FEF0AE8C608054865619520F51EA2B94931C02325BA01CD6A68C' $bitmap_data &= 'B756F1B073FB96E911E40FC6901AF8A314D1321EA0A9A5DE87A30A0028A5CAFA8A38F5A004A28E3D45191DC8A0028A42CA3B8A699147A9A007E2B3F52D405B030C0434E4738E420F53EA7DAA6B969A48' $bitmap_data &= '5922631923008EB5CECCAD071306CFF78F434010C8D8CE5896639249E49A80D3DDB3CE6A3EBC0A0050326A454269F1444F6AB71407D29811450D5A8E1CF6A9E283DB35761B53C641FA0A00AD1404F41F' $bitmap_data &= 'A5695A596F39EC3B9AB56F641797181FDDABAA00000000F41400D8E358D70A31FD69D4514005145140051451400B4514500145145002514514005145140052D252D001494B450031D158723F1AA93D98' $bitmap_data &= '61903F1ABB450060CF6AC9CE38AA8F19F4AE99E256F63EB5525B6507E7418F51401CFB478EBC7D6912DA590E11767FB4C39FC16B6C5AC4A73819F7A9156341C103E9480CEB3D35223B8825C9F989E49A' $bitmap_data &= 'BEB18518029FB9474A42DF4A00428290C4A7A8A524D19A006F94BE94794B4B45002794BE9486343D69D450037628ED4BB56968A004205432C09229565041EB53519A00C2BAD0D598BC0DB7FD9ED5485A' $bitmap_data &= 'F94712C6C873D71B97F3ED5D4E47714D748D87CE463DC50062C16D9008C37B835761B43C647156E2B6877E6284313DD54568456C1797C67D05302A5BD9E718181EA6AFC50AC7D064FAD483A5140052D1' $bitmap_data &= '45001494B494005145140051451400B4514500145145002514514005145140052D252D001451450025145140051DA8A2802096DA393D54FB7F85577B5957EE10FF00A1ABF45006531643875653EE2943' $bitmap_data &= '83D0D6A544D6D049CB44B9F51C50051068CD4B359C680947907FC0B3FCEB3E491E3FE2DDF51480B79A3354C4EFED4E12B1F4A00B39A3350AB16EA6A4099FE36FD2801DBA90B0F5A516E0FF00CB47FD3F' $bitmap_data &= 'C2A54B146FBD2CBF98FF000A0080BD30CAA0E3233E9DEAFA69F6E3EF296FF7989A9E3863887EEE355FA0A00CC8E29E5FBB1B01FDE6E2ACC76001CCCFBFFD91C0ABB450022A855C28007A014B4514C028' $bitmap_data &= 'A28A005A28A2800A4A5A4A0028A28A0028A28A005A28A2803FFFD9' Return Binary($bitmap_data) EndFunc Br, UEZ1 point