![]() |
|
|||||
|
Creating the Bitmap | |||||
We will need a bitmap so we create it here, loading the base image from file. [C#]
|
||||||
|
Creating the image | |||||
We put the horizontal and vertical borders into a Size structure. To find the size of the output bitmap we subtract twice the borders from the image size. [C#]
|
||||||
|
Drawing the image | |||||
We then create a new bitmaps of the correct size, copying the resolution from the original image. Then we draw the image, offset up and left by the border size. [C#]
|
||||||
|
Saving | |||||
Finally we save the picture as a JPEG image. [C#]
|
||||||
|
Input and Output | |||||
Sample input and output images are shown below.
|