The border I put around it must cause the final combined bmp to ...
a) have dimensions of Exactly 512 x 512
Depending on what you then do with the bordered image, another way might be:
- create a Panel that is 512 x 512 pixels
- add an ImageView to the panel, so that its position coordinates are relative to the panel
- load the .bmp to the ImageView
- set the Panel to be solid color of the (0, 0) pixel of the ImageView
- center horizontally with ImageView.Left = (Panel.Width - ImageView.Width) / 2
- center vertically likewise
You can then move the Panel around the screen as required.
Some panels have a SnapShot method that will return the image with the border.