If you have Dark Basic Professional then this is a very simple task to achieve.
#Constant LeftMouseButton = 0x01
#Constant BoxSize = 64
Type Point2
X As Integer
Y As Integer
EndType
Sync On : Sync Rate 30
Disable EscapeKey
Global Dim Pixel(BoxSize, BoxSize) As Integer
Global Mouse As Point2
Global TestImage As Integer = 1
Load Image "Default_Color.DDS", TestImage
Repeat
If MouseClick() = LeftMouseButton
Mouse.X = MouseX()
Mouse.Y = MouseY()
`/ Get The Current Pixels
Lock Pixels
For X = 0 To BoxSize
For Y = 0 To BoxSize
Pixel(X, Y) = Point(X + Mouse.X, Y + Mouse.Y)
Next
Next
`/ Plot Pixels X + 1
U = 0
Inc Offset
If Offset > BoxSize
Offset = 0
EndIf
For X = 0 To BoxSize
U = X + Offset
If U > BoxSize
U = 0 + (U - BoxSize)
EndIf
For Y = 0 To BoxSize
Dot U + Mouse.X, Y + Mouse.Y, Pixel(X, Y)
Next
Next
Unlock Pixels
Else
Paste Image TestImage, 0, 0
EndIf
Sync
Until EscapeKey()
`/ Garbage Collect /
Delete Image TestImage
End
There's a minor issue with my code, so try not to go offscreen with the pixel box; because it'll crash. Reason is the Pixel Buffer is trying to write to memory that doesn't exist, it's quite easily correctly but not quickly.
It should give you a good idea of how you can use the pixels though.