OH MAH GAAWDDDDD PLEASE HELP!!!1111
</allcapsrage>
I'm trying to loop through each pixel on an image and record it's color, but the loop just won't run!!!!!11111 :evil:
My current code:
Convert:
pToken := Gdip_Startup() ;Start GDIP
pBitmap := Gdip_CreateBitmapFromFile(image) ;Create a bitmap from a file (jpg, png, gif ...)
Width := Gdip_GetImageWidth(pBitmap) ;Get image width
Height := Gdip_GetImageHeight(pBitmap) ;Get image height
Loop Width {
x := x + 1
Loop Height {
y := y + 1
dec := Gdip_GetPixel(pBitMap, %x%, %y%) ;Get the pixel color
colors .= DEC2HEX(dec, "true") ;Add it to the variable
}
}
Gdip_DisposeImage(pBitmap) ;Dispose of the image
Gdip_Shutdown(pToken) ;Shutdown GDIP
return
EDIT:
AHHHH
Fixed :evil: :evil: :evil:
Didn't have %'s around my variables in the loop .....





