I have an image that is 240x320 (iphone camera image in portrait), and I need to programmatically (in C#) add white \"bars\" to the sides increasing the full image size to 320x3
using (System.Drawing.Image src = System.Drawing.Image.FromFile("picture.jpg"))
{
using (Bitmap bmp = new Bitmap(320, 320))
{
Graphics g = Graphics.FromImage(bmp);
g.Clear(Color.White);
g.DrawImageUnscaled(src, 60, 0, 240, 320);
bmp.Save("file.jpg", ImageFormat.Jpeg);
}
}
Remember to dispose the object after use ;)