Reading a pixel

BlitzMax Forums/BlitzMax Beginners Area/Reading a pixel

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

You have to convert the Image to TPixmap and then you can read the Pixel.


'Pseudo

Local Image:Timage = LoadImage("Test.jpg")

Function ReadPixel:Int(_Image:Timage,_X,_Y)
local Temp:Tpixmap = Lockimage(_Image)
Color = Temp.ReadPixel(_X,_Y)
UnlockImage(_Image)
Return Color
End Function