Skip to content

Instantly share code, notes, and snippets.

@brigand
Created October 24, 2012 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brigand/3949328 to your computer and use it in GitHub Desktop.
Save brigand/3949328 to your computer and use it in GitHub Desktop.
#Include <GDIp>
#Include <GDIpHelper>
JustTheBasics()
pBitmap := Gdip_CreateBitmapFromFile("superhero.jpg")
G := Gdip_GraphicsFromImage(pBitmap)
W := Gdip_GetImageWidth(pBitmap)
H := Gdip_GetImageHeight(pBitmap)
CX := W / 3
CW := W / 3
CY := 0
CH := H / 3
Gdip_SetClipRect(G, CX, CY, CW, CH)
pBitmapBlur := Gdip_BlurBitmap(pBitmap, 75)
Gdip_DrawImage(G, pBitmapBlur, 0, 0, W, H)
Gdip_SaveBitmapToFile(pBitmap, "superhero2.jpg", 80)
Gdip_DisposeImage(pBitmap)
Gdip_DisposeImage(pBitmapBlur)
Gdip_DeleteGraphics(G)
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment