Basic Image Manipulation using GDI+ and C# - Image Manipulation using GDI : the Terminology
(Page 2 of 4 )
Before understanding how to use GDI+ APIs for image manipulation, it is important to understand what GDI+ really is and what constitutes its vocabulary. If we consider basic image manipulation, there are four points that need to be understood, which are
- GDI+
- Vector Graphics
- Raster Graphics
- Imaging
The second, third and fourth are integral parts of the image manipulation vocabulary. The fourth term in itself consists of many terms, some of which will be discussed in the appropriate section.
GDI+
By definition "GDI+ is a library that provides an interface that allows programmers to write Windows and Web graphics applications that interact with graphical devices such as printers, monitors, or files." In essence, it provides a layer of abstraction over various devices with which the GUI needs to work. This abstraction works by converting the data into a device compatible form. The device then turns the data into a human readable form. The implementation of GDI+ is in the form of C++ classes that can be used from a .Net environment. In the .Net library, GDI+ classes are exposed through the System.Drawing and its namespaces.
Vector Graphics
By definition this is "Graphics in which an image is stored as a series of numbers defining size, position, and shape." In other words, in vector graphics the image contains position vectors describing the image, where a vector represents both quantity and direction. For example, instead of containing a bit in a file for a line being drawn, a vector graphics file describes a series of points to be connected. Since the file contains vector commands, the file size is small.
Raster Graphics
Raster is a grid of x- and y- co-ordinates on a display space which in this case is the display device. A Raster Graphics file contains information identifying which of these coordinates to illuminate using monochrome (black and white) or spectro-chrome (color) values. Raster images are also known as bit-mapped images or bitmaps because they contain information directly mapped to the display device's grid. Raster graphics files are larger than Vector Graphic files.
Imaging
Imaging is the process of viewing and manipulating images. In managed GDI+, imaging has two facets, basic and advanced. The basic processes cover loading and saving, zooming, scaling and so forth, whereas the advanced ones cover color palette, metafiles and tagged images. The basic functionalities are encapsulated in the Image class. It provides methods to load, save and create images. The subclasses of the Image class i.e. Bitmap and Metafile provide the functionality for displaying and manipulating the images.
That was a bird's eye view of the recurring terms in the world of GDI+ and image manipulation. In the next section I will discuss steps to take when loading and manipulating images; I will cover flipping as well as rotating the image.
Next: Image Manipulation Using GDI : Step By Step >>
More C# Articles
More By A.P.Rajshekhar