Quantcast
Viewing all articles
Browse latest Browse all 3693

New Post: add white bars/background wider than a portrait image (centering the photo)

This code assumes that your input image is not larger then 1200x629. If you want to be able to handle larger images you should first resize it like this:
if (image.Width > 1200 || image.Height > 629)
  image.Resize(1200, 629);
This method will resize the image to fit inside a rectangle that is 1200x629. And after the resize you should extent to image to 1200x629.

Viewing all articles
Browse latest Browse all 3693

Trending Articles