C#
  Home arrow C# arrow Lossless Image Converting in 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#

Lossless Image Converting in C#
By: Barzan "Tony" Antal
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 6
    2008-02-13

    Table of Contents:
  • Lossless Image Converting in C#
  • First Things First
  • The Real Thing
  • Taking a Break

  • 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


    Lossless Image Converting in C#


    (Page 1 of 4 )

    Images can be easily categorized into love-hate relationships when it comes to actually working with them from the programmer’s point of view. Nowadays images are a must in almost every Windows application and we tend to run into images quite often. In this series we are going to get into the details of image resizing and conversion.Throughout this two-part article we are going to create a seemingly simple, yet powerful, Lightweight Image Manipulation application. As the title suggests, we'll do this in the C# language using the .NET environment and relying on GDI+ and Graphics. At the end you will find the source code of this project in its entirety available for you to download.

    However, I truly think that following along won't be a hard task if you have a bit of programming experience and especially if you are familiar with the syntax of C#. Thus, during this tutorial I am going to assume that the reader knows the syntax well enough - at least on the intermediate level - so we won't begin with the Hello Word example.

    We should be advancing quite steadily and at a relatively fast pace, so hopefully nobody gets bored to tears. Before we approach a situation we clarify in plain English what we want to accomplish and then we formulate an algorithm that accomplishes this. After this, each subroutine will get thoroughly explained as well as the reason for using the required methods.

    Since this is a two-part series, in order to maintain the simplicity of the tutorial and to make things easy to follow, we will also split our application into two parts. First we will cover lossless conversion and then the second part will contain the resizing process along with color quantization. Color quantization must be discussed in order to understand the theory beyond the GIF extension and how to preserve high quality.

    Finally at the end of the second part we will attach the source code for the entire project so you can download it and have fun with it. I have used Visual Studio 2005 but it should work with any Visual C# IDE in the .NET environment. A partial source code will also be attached at the end of this first part, particularly the conversion section.

    All of this being said, since you're anxiously waiting to begin... here we go now.

    More C# Articles
    More By Barzan "Tony" Antal


       · Thanks for reading the first part of this 2-part series. Don't hesitate to leave...
       · The quality of the result image is poor... with graphics software (gimp, photoshop)...
     

    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 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek