Is there another way of doing it?
Used this code for testing.
#SingleInstance, Force #NoEnv SetBatchLines, -1 fileselectfile,file1 gui,add,text,w200 h30 vmytext Gui, Add, Progress, w300 h20 cBlue vMyProgress gui,add,picture, h200 w-1 vmyimage,%file1% Gui, show,,progress settimer,alert,20 gosub start return alert: GuiControl,, MyProgress, % x*100/h return start: QPX( True ) If !pToken := Gdip_Startup() { MsgBox, 48, gdiplus error!, Gdiplus failed to start. Please ensure you have gdiplus on your system ExitApp } pBitmap := Gdip_CreateBitmapFromFile(File1) w := Gdip_GetImageWidth(pBitmap), h := Gdip_GetImageHeight(pBitmap) Gdip_LockBits(pBitmap, 0, 0, w, h, Stride, Scan0, BitmapData) y := 0 Loop, %h% { x++ Loop, %w% { color := Gdip_GetLockBitPixel(Scan0, A_Index-1, y, Stride) Gdip_FromARGB(color, A, R, G, B) newcolor:=Gdip_ToARGB(180, R, G, B) Gdip_SetLockBitPixel(newcolor, Scan0, A_Index-1, y, Stride) } y++ } Gdip_UnlockBits(pBitmap, BitmapData) Gdip_SaveBitmapToFile(pBitmap, "FinalImage.png") Gdip_DisposeImage(pBitmap) Gdip_DeleteGraphics(G) Gdip_Shutdown(pToken) Ti := QPX( False ) GuiControl,, myimage, *h200 *w-1 finalimage.png controlsettext,static1,time needed=%Ti% ,progress Gui, Show, AutoSize Center Return QPX( N=0 ) { ; Wrapper for QueryPerformanceCounter()by SKAN | CD: 06/Dec/2009 Static F,A,Q,P,X ; www.autohotkey.com/forum/viewtopic.php?t=52083 | LM: 10/Dec/2009 If ( N && !P ) Return DllCall("QueryPerformanceFrequency",Int64P,F) + (X:=A:=0) + DllCall("QueryPerformanceCounter",Int64P,P) DllCall("QueryPerformanceCounter",Int64P,Q), A:=A+Q-P, P:=Q, X:=X+1 Return ( N && X=N ) ? (X:=X-1)<<64 : ( N=0 && (R:=A/X/F) ) ? ( R + (A:=P:=X:=0) ) : 1 } guiclose: esc:: exitapp
Update : Using Tic's esplanation of construction of the matrix in drawimage i solved my question
<!-- m -->http://www.autohotke...ic63741-15.html<!-- m -->
To change into transparent value 180 :
Matrix =
(
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 0.7 0
0 0 0 0 1
)