; 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