I started writing code for making a rubber band on a TImage using pixels[]. No matter what I did it wanted to draw only light gray lines. So I created a very simple piece of test code on a pre-existing image (so it's initialized already):
Can you post that pre-existing image here?
It could be the cause of the problems.
For example if it has a weird color palet then the pixels need to be in that palet.
As I wrote: that is the wrong approach, use canvas lineto etc.
Will add example later.
Using lineto would be more appropriate for drawing a box... but isn't the issue here.
If you want to manipulate direct pixels on the canvas, the coloring should work too, and it doesn't in this case... that's the issue.
Could you create your example where you manipulate pixels directly, setting a certain color for a pixel?