C#
  Home arrow C# arrow Color Transformation in C# GDI+ Programmin...
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#

Color Transformation in C# GDI+ Programming
By: Xianzhong Zhu
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2008-07-16

    Table of Contents:
  • Color Transformation in C# GDI+ Programming
  • Introduction to Color Transformation
  • A Sample that Uses Color Transformation Matrices
  • Conclusion

  • 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


    Color Transformation in C# GDI+ Programming


    (Page 1 of 4 )

    In this article, we will introduce GDI+, focus on basic color transformation programming with GDI+ in C#, and discuss the 4x4 and 5x5 color transformation matrix. We will then offer sample applications to demonstrate how to change existing color components.

    Overview of GDI+

    GDI+ is the portion of the Windows XP or Windows Server 2003 operating system that provides two-dimensional vector graphics, imaging, and typography. GDI+ improves on the traditional Windows Graphics Device Interface (GDI) by adding new features and by optimizing existing features.

    Because it's still a graphics device interface, GDI+ allows programmers to write device-independent applications. As with GDI, GDI+ allows developers to render data on a screen or printer without considering the details of a particular display device. The programmer makes calls to methods provided by GDI+ classes and those methods in turn make the appropriate calls to specific device drivers. GDI+ insulates the application from the graphics hardware, and it is this insulation that allows developers to create device-independent applications.

    Let’s take a closer look at the position of GDI+ inside the whole .NET architecture.


    Figure 1—GDI+ inside the whole system architecture

    As is indicated in Figure 1, GDI+ is one of the modes to develop graphics applications along with GDI and DirectX. As higher wrapper classes, GDI+, like GDI, mainly serves to render graphics, images, and text with more powerful functionalities. Another important difference is that GDI+ adopts a new stateless pattern. This substitutes for GDI, which selects objects into a device context object (i.e. drawing operations within GDI+ are independent of each other).

    On the other hand, the services of Microsoft Windows GDI+ can be divided into three categories: 2-D vector graphics, Imaging, and Typography.

    2-D vector graphics involves drawing primitives (e.g. lines, curves, and figures) that are specified by sets of points on a coordinate system.

    Because certain kinds of pictures are difficult or even impossible to display via vector graphics, various bitmaps are introduced to store various complex images. This is called Imaging. As you image, data structures that store information about bitmaps tend to be more complex than those required for vector graphics, so there are several classes in GDI+ devoted to this method.

    Typography is concerned with the display of text in a variety of fonts, sizes, and styles. One of the new features in GDI+ is sub pixel anti-aliasing, which gives text rendered on an LCD screen a smoother appearance.

    More C# Articles
    More By Xianzhong Zhu


       · Could you please also provide more in depth introduction about color matrix and so...
     

    C# ARTICLES

    - 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
    - Pointers and Arrays in C#





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