-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path1 Frame.ahk
More file actions
22 lines (22 loc) · 746 Bytes
/
1 Frame.ahk
File metadata and controls
22 lines (22 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
SetBatchlines,-1
;Init
#Include <gdip>
pToken:=gdip_startup()
LoadedImage:=Gdip_CreateBitmapFromFile("Test.jpg")
W:=Round((apw:=Gdip_GetImageWidth(LoadedImage))*1.2,0)
H:=Round((aph:=Gdip_GetImageHeight(LoadedImage))*1.2,0)
;GUI
Gui,add, Text, x0 y0 w%w% h%h% hwndDrawArea,Loading...
Gui,Show,% "w" w " h" h
;GDI to GUI stuff
DrawAreaDC:=GetDC(DrawArea)
GDrawArea:=gdip_graphicsfromHDC(DrawAreaDC)
BufferBitmap:=Gdip_CreateBitmap(w,h)
BufferGraphics:=gdip_GraphicsfromImage(BufferBitmap)
Gdip_DrawImage(BufferGraphics, LoadedImage,0,0,W,H) ;Bild skaliert auf die BufferGraphics zeichnen
Gdip_DrawImage(BufferGraphics, LoadedImage,Round(apw*0.1,0),Round(aph*0.1,0),apw,aph)
Draw:
Gdip_DrawImage(GDrawArea, BufferBitmap)
return
GuiClose:
ExitApp