If I wanted to move / shift the pixels of a bitmap how could I do so?
procedure MovePixels(Bitmap: TBitmap; Horizontal, Vertical: Integer);
begin
{ move the Bitmap pixels to new position }
end;
Example:

By calling MovePixels(Image1.Picture.Bitmap, 20, 20) for example would output like so:

It would be useful to also specify / change the color of the canvas that is left showing after moving the pixels. So in this example that gray / brown color could be blue etc.
I noticed there is Bitmap.Canvas.Pixels and Bitmap.Canvas.MoveTo properties, is this what I would need to do this?
I really don’t know and I bet it is so simple..
You can’t easily move pixels, but you can make a copy.
What remains is to fill in the space with the colour of your choice which I am sure you can do easily enough with a couple of calls to
FillRect.However, I think that it would be simpler not to attempt this in-place. Instead I would create a new bitmap. Perhaps like this: