Tagged with gdi

Resize image to be web friendly

There’s already a post about this subject on the blog but it is in italian, I want to propose it again because the task of resizing and slim the pictures we got (for facebook, for our blog) is a common task we are all used to. Here’s the code and a small console app you … Continue reading

Create an image from text (Updated)

I’ve done a few changes and some additions on the code of the previous post. The CreateTextImage now prints the text at the center of the image, this is done using the Alignment property of the StringFormat class: public Bitmap CreateTextImage(string imageText) { Bitmap outputImage = new Bitmap(1, 1); int imageWidth, imageHeight = 0; //setup … Continue reading