Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

GDI+ Rotate-Trasparency-Gradient

$
0
0

Hello,

I need to do all of three in the same control Pic. I have found some example but they are all related to save an image "edited", but i don't need to do that but:

. Rotate an image of 180° (Done, but i don't know how to set the Widht-Height?)

. Add a trasparency to image like WinSetTrans

. Add a vertical gradient, from trasparent color ( top ) to black ( bottom )

. Show all this in gui-memory only (GUICtrlCreatePic) without saving

 

My code:

AutoIt         
#include <GUIConstantsEx.au3> #include <GDIPlus.au3> Global $iW = 500, $iH = 500, $hImage _GDIPlus_Startup() Global $hGUI = GUICreate("Image", $iW, $iH) _RotateImage("image.jpg", 0, 0, 25, 25) GUISetState() Do     Sleep(100) Until GUIGetMsg() = -3 _GDIPlus_ImageDispose($hImage) _GDIPlus_Shutdown() Exit Func _RotateImage($hImage, $left, $top, $width, $height)     $hPicture = GUICtrlCreatePic("", $left, $top, $width, $height)     GUICtrlSetState(-1, $GUI_DISABLE)     $hImage = _GDIPlus_ImageLoadFromFile($hImage)     DllCall($ghGDIPDll, "int", "GdipImageRotateFlip", "hwnd", $hImage, "long", 2)     Local $hBMP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)     _WinAPI_DeleteObject(GUICtrlSendMsg($hPicture, 0x0172, 0, $hBMP)) EndFunc   ;==>_RotateImage  

Thanks


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>