IT Community - Software Programming, Web Development and Technical Support

How to convert 8-bit bitmap to 24-bit bitmap?

This is a discussion on How to convert 8-bit bitmap to 24-bit bitmap? within the Mobile Software Development forums, part of the Software Development category; How to convert 8-bit bitmap to 24-bit bitmap?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > Mobile Software Development

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-17-2007, 11:07 PM
theone theone is offline
D-Web Sr.Programmer
 
Join Date: Jun 2007
Posts: 129
theone is on a distinguished road
Default How to convert 8-bit bitmap to 24-bit bitmap?

How to convert 8-bit bitmap to 24-bit bitmap?

Last edited by theone : 07-30-2007 at 03:45 AM.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-30-2007, 03:46 AM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Thumbs up Re: How to convert 8-bit bitmap to 24-bit bitmap?

Hi one

To convert 8-bit to 24-bit image, one way is to draw another bitmap based on original bitmap's pixel color:

Bitmap image = new Bitmap(@"C:\bit8.bmp");
Bitmap bitmap = new Bitmap(image.Width, image.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb) ;
for (int i = 0; i < image.Width; i++)
{
for (int j = 0; j < image.Height; j++)
{
Color temp = image.GetPixel(i, j);
bitmap.SetPixel(i, j, temp);
}
}
bitmap.Save(@"C:\bit24.bmp", System.Drawing.Imaging.ImageFormat.Bmp);

Hope Informative,
__________________
The KINGMAKER
Makes Every Thing Possible

Stuffs (My Blog)
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert YUV to RGB kingmaker C# Programming 2 02-17-2008 12:07 AM
Bitmap checkpoint saved itbarota Testing Tools 1 08-17-2007 03:50 AM
Bitmap checkpoints Shanthi Testing Tools 1 08-10-2007 06:08 AM
Can anyone know a Simple method to convert a bitmap to icon using c# dot net? Archer C# Programming 1 07-22-2007 11:31 PM
How to convert 8-bit bitmap to 24-bit bitmap? theone C# Programming 1 07-19-2007 12:58 AM


All times are GMT -7. The time now is 09:26 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0