C#
  Home arrow C# arrow Page 2 - Basic Image Manipulation using GDI+ and C#
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
C#

Basic Image Manipulation using GDI+ and C#
By: A.P.Rajshekhar
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 16
    2006-10-24

    Table of Contents:
  • Basic Image Manipulation using GDI+ and C#
  • Image Manipulation using GDI : the Terminology
  • Image Manipulation Using GDI : Step By Step
  • Image Manipulation in the Real World

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    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

    1. GDI+
    2. Vector Graphics
    3. Raster Graphics
    4. 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.     

    More C# Articles
    More By A.P.Rajshekhar


       · GDI+ is a great progress over GDI in terms of API calls. In this article I have...
       · Hi,I've application to capture video of image and grab the still image. It runs...
     

    C# ARTICLES

    - C# and XML
    - Pointers and Arrays in C#
    - C# 3.0 Extension Methods
    - Overloading Operators in C#
    - Iterators and Nullable Types
    - Patterns and Iterators in C#
    - C# Exceptions
    - Methods in C#
    - Delegates and Events in C#
    - Advanced C#
    - Working with Regular Expressions in C#
    - Sending Simple E-Mail in C#
    - Building C# Comparable Objects: IComparable ...
    - Color Transformation Applications in C# GDI+...
    - Performing Color Transformation Operations i...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
    Stay green...Green IT