A good picture may say a thousand words, but in the world of digital imaging,
a thousand pixels does not a good picture make. When you happen to have a
good digital picture, it is important to understand some underlying truths
about digital image processing before you manipulate and alter the image. As
we'll see, even the simple act of rotating a picture can muck up the quality
of the underlying image file.
This article introduces some basic concepts and techniques used in image
processing, and introduces some of the image-processing operations provided
by the .NET Framework. I will discuss images and bitmaps, the notion of an
image codec, and take a closer look at the JPEG image codec supported by the
.NET Framework.
Images in .NET
As you may know, Microsoft provides the graphical device interface, or GDI+,
to support graphics programming within Windows operating s... (more)
The Windows Forms namespace in .NET includes a number of classes for building
Windows-based applications. One such class is the PictureBox control, which
displays an image within a control window. This article shows how to extend
the PictureBox control in a custom PhotoBox control that can preserve the
aspect ratio of a displayed image, and discusses how to use this control in
the Windows Forms Designer window of Visual Studio .NET.
Figure 1 shows a photograph in a standard PictureBox control with the
SizeMode property of StretchImage. This setting stretches and distorts the
ima... (more)