Decrease color depth to RGB8 (256 color 8 bit)

Ed_N
09-21-2006, 06:34 AM
Hi

I'm trying to load a bitmap picture, read the pixel values and then store them in a file with its equivalent 8 bit value.

I'm trying to use this:

Dim bm As Bitmap = New Bitmap(YHeight, XWith, _
System.Drawing.Imaging.PixelFormat.Format8bppIndexed)
but doesn't seem to work. Any way of doing this in a easy way?

OnErr0r
09-21-2006, 07:47 AM
All you did there is create a new 8 bit black bitmap. Color quantization (with good quality) is usually far from easy. I have an example posted in the Code Library: http://www.xtremevbtalk.com/showthread.php?t=128891

Ed_N
09-21-2006, 09:18 AM
That's exactly what I need. Basically the application I need to do is to read the byte pixel value in Hex and write it (or output it to a textbox) so I can use it somewhere else (i.e. an embedded system)

Thanks!

Iceplug
09-22-2006, 06:05 PM
Check out this thread:
http://www.xtremevbtalk.com/showthread.php?t=128875

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum