【Draw image on desktop with GDI Plus】

; Draw image on desktop with GDI Plus

If OpenLibrary(0, “gdiplus.dll”) = 0
MessageRequester(“Error”,"Required component gdiplus.dll is not found. Please install it and retry ", #MB_ICONERROR)
End
EndIf
Structure GdiplusStartupInput
GdiPlusVersion.i
*DebugEventCallback.DebugEventProc
SuppressBackgroundThread.i
SuppressExternalCodecs.i
EndStructure
Structure RectF
x.f
y.f
width.f
height.f
EndStructure

Structure ColorMatrix ;{
M00.f
M01.f
M02.f
M03.f
M04.f
M10.f
M11.f
M12.f
M13.f
M14.f
M20.f
M21.f
M22.f
M23.f
M24.f
M30.f
M31.f
M32.f
M33.f
M34.f
M40.f
M41.f
M42.f
M43.f
M44.f
EndStructure ;}

Global ncolor.ColorMatrix
With ncolor
\M00=1
\M11=1
\M22=1
\M33=0.3
\M44=1
EndWith

#UnitPixel=2
#Count=10

Global Dim Bx.w(#Count),Dim By.w(#Count)
Global Dim adx.w(#Count),Dim ady.w(#Count)
Global Dim nColors.f(#Count,3)
Global D.w=180
Global Dw.w,Dh.w
Global m_hdcMemory
Global *imgc

Import “gdiplus.lib”
GdiplusStartup(token, *input.GdiplusStartupInput, output)
GdiplusShutdown(token)
GdipCreateFromHDC(hdc, *graphics)
GdipReleaseDC(*graphics, hdc.l)
Gdip

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值