Tag Archives: resize images

Resize images in C#

You can use MS Paint to easily resize images. Unfortunately, it won’t preserve transparency if you save the result. I often need to resize transparent images so I finally got around to writing this example. It lets you resize images … Continue reading

Posted in drawing, graphics, image processing | Tagged , , , , , , , , , | 4 Comments

Scale images and save them in C#

Occasionally when I’m writing a book or article, I need to scale images and then save them. MS Paint does this easily, but it loses any transparency information when it saves images. This program lets you scale images and then … Continue reading

Posted in drawing, graphics, image processing | Tagged , , , , , , , , , , , , | 1 Comment

Resize an image to view its pixels in C#

This example shows how to resize an image so it is big enough to view its pixels. Normally you want resized images to be smooth, but this technique can be useful if you want to see exactly what colors the … Continue reading

Posted in graphics, image processing | Tagged , , , , , , , , , , , | Leave a comment

Make a montage editor in C#, Part 2

The post Make a montage editor in C#, Part 1 explains how the montage editor loads, draws, and saves images. This post explains how the program lets you manipulate images. When you move the mouse over an image’s body, it … Continue reading

Posted in graphics, image processing | Tagged , , , , , , , , , , , , , , | 1 Comment

Make a montage editor in C#, Part 1

A while ago I wanted to make a montage showing a bunch of different pictures. I got a reasonable result by using MS Paint but it was a huge amount of work. After resizing and positioning a picture in the … Continue reading

Posted in graphics, image processing | Tagged , , , , , , , , , , , , , , | 1 Comment

Draw smooth graphics in C#

This example shows how to draw smooth graphics such as text, resized images, lines, and shapes. When drawing, C# sometimes favors speed over quality. If you look closely at the picture shown here, you’ll see that the text, image, and … Continue reading

Posted in drawing, fonts, graphics | Tagged , , , , , , , , , , , , , , , , , | Leave a comment

Resize pictures in a directory in C#

This example shows how to resize pictures in a directory. This program lets you enter a directory name and a scale factor. It then loads all of the bmp, gif, jpg, jpeg, and png files in that directory, resizes them, … Continue reading

Posted in files, graphics | Tagged , , , , , , , , , , , , , , , | 1 Comment

Resize images and save the results in C#

This program lets you load and resize images, and save the results into files. When the form loads, the following Load event handler saves the scale factor for each of the scaling menu items in their Tag properties. // Set … Continue reading

Posted in files, graphics | Tagged , , , , , , , , , , , , , | Leave a comment