C#
  Home arrow C# arrow Thumbnails and Zooming with 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  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
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#

Thumbnails and Zooming with GDI+ and C#
By: A.P.Rajshekhar
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 13
    2006-10-31

    Table of Contents:
  • Thumbnails and Zooming with GDI+ and C#
  • Image Manipulation: Thumbnail, Zooming and Saving
  • Image Manipulation in the Real World
  • Image Manipulation in the Real World, continued

  • 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


    Thumbnails and Zooming with GDI+ and C#


    (Page 1 of 4 )

    In the last part I gave you a bird’s eye view of what GDI+ is and showed you how to set up an application for using GDI+. However, without knowing more about the facilitator (i.e. GDI+), going forward would be counterproductive. Hence, in this part, along with different image manipulation techniques, the focus will be on the essentials of GDI+.

    In the first section of this article, I will discuss GDI+ in brief, including the differences from its predecessor, that is GDI. The second section will focus on the manipulation techniques such as zooming and creating thumbnails. In the third and fourth sections I will extend the application created in the last part to include the techniques introduced in this discussion. That is the outline of this discussion.

    More About GDI+

    GDI+ essentially refers to the library that helps developers to interact with various devices such as monitors, printers, and others that have graphical capabilities without going into low-level details of these devices. The essence of GDI+ is that it can interact with peripherals such as monitors and present data in human readable form. From the point of view of a developer, it's a monumental task to interact directly with these devices. 

    This is where GDI+ comes into picture. It acts as a conduit and a translator for the data being passed between devices and applications. Even controlling the command line terminals comes under GDI+. It does everything from printing a "Hello World" program on the console to drawing lines, rectangles and so forth and printing a form. Pictorially it can be shown thus:

    The next question that arises is how does GDI+ work? To make it crystal clear, let's look at an example of drawing a line. A line, in essence, is a sequence of pixels from a starting location (X­­0, Y0) to an ending location (Xn, Yn). To draw such a line the devices (the monitor in this case) need to know the device coordinates or physical coordinates.

    However, instead of directly telling the device, the call is made to the drawLine() method of GDI+, and GDI+ draws the line from point A to point B in the memory, also known as video memory. GDI+ reads the point A and point B locations, converts them to a sequence of pixels, and tells the monitor to display the sequence of pixels. In short, GDI+ converts device independent calls to a device understandable form and vice versa.

    So that’s an overview of how GDI+ works. Let's now move on to the topic of image manipulation.

    More C# Articles
    More By A.P.Rajshekhar


       · In the second part of the series I have discussed about the working of GDI+ as well...
     

    C# ARTICLES

    - C# Meets Design Patterns
    - Coding a CRC-Generating Algorithm in C
    - Cyclic Redundancy Check
    - Handling Methods and Functions
    - Destroying Objects in C#
    - Creating Objects in C-Sharp
    - Classes and Objects
    - Programming Languages: Managed versus Native
    - LINQ-to-MySQL with DbLinq in C#
    - Working with Dates and Times in C#
    - Generics, Dictionaries, and More
    - More About Generics
    - Working with C# Collections
    - Generics
    - C# and XML





    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 11 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek