Application #88. Work with GDI+ to Manipulate Images

This sample shows you how to manipulate images using GDI+, including changing the size of an image and rotating, zooming, and cropping an image.

Building Upon...

Application #85: Work with GDI+ Pens

New Concepts

GDI+ provides new ways to work with images. This example illustrates several of them.

Changing the Size of an Image

Once you’ve loaded your image into a PictureBox, you can apply one of four SizeMode settings to the PictureBox:

  • AutoSize The PictureBox size is adjusted to match the size of the image in it.

  • CenterImage The image is displayed in the center of the PictureBox. If the image is larger than the PictureBox, its outside edges are clipped.

  • Normal The image is located in the ...

Get 101 Microsoft® Visual Basic® .NET Applications now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.