Converting a 24 bit bitmap 
Author Message
 Converting a 24 bit bitmap

Can someone tell me how can I conver a 24 bit image to
a 256 color bitmap or to a JPG file?


Sat, 17 Jul 2004 16:27:01 GMT  
 Converting a 24 bit bitmap

Quote:
> Can someone tell me how can I conver a 24 bit image to
> a 256 color bitmap or to a JPG file?

To convert to an 8-bit bitmap requires more work than you may expect, mostly
because you've got to find the best palette to represent the image (24-bit
images aren't based on palette's where was <= 8-bit are).  Various
colour-space quantisation methods exist and you can find information about
these if you do a search but be warned it's quite tricky.  There is a VB
implementation on www.vbaccelerator.com though if you don't fancy giving it
a shot yourself.
To save as a .JPG then you'll need to grab the IJL off www.Intel.com and
you'll find a demonstration VB project in there that shows you how to
convert a bitmap to JPEG.
Hope this helps,

    Mike

 -- EDais --

 - Microsoft Visual Basic MVP -
WWW: Http://EDais.earlsoft.co.uk/




Sat, 17 Jul 2004 17:37:49 GMT  
 Converting a 24 bit bitmap
The sample you pointed to at www.vbaccelerator.com works great Mike but
there is a couple of typeo's/bugs in the source. A search on google will
turn up the thread outlining the mistakes in the original source.
I modified that code to try and increase the execution speed. See:
http://www.lebans.com/pictureboxtogif.htm
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.



Quote:
> > Can someone tell me how can I conver a 24 bit image to
> > a 256 color bitmap or to a JPG file?

> To convert to an 8-bit bitmap requires more work than you may expect,
mostly
> because you've got to find the best palette to represent the image
(24-bit
> images aren't based on palette's where was <= 8-bit are).  Various
> colour-space quantisation methods exist and you can find information
about
> these if you do a search but be warned it's quite tricky.  There is a
VB
> implementation on www.vbaccelerator.com though if you don't fancy
giving it
> a shot yourself.
> To save as a .JPG then you'll need to grab the IJL off www.Intel.com
and
> you'll find a demonstration VB project in there that shows you how to
> convert a bitmap to JPEG.
> Hope this helps,

>     Mike

>  -- EDais --

>  - Microsoft Visual Basic MVP -
> WWW: Http://EDais.earlsoft.co.uk/





Sun, 18 Jul 2004 01:55:08 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Howto change 24 bit bitmap into 8 bit bitmap in vb

2. 24-bit to 1-bit bitmap

3. BMP 24-bit to BMP 1-bit converting

4. Convert 16 bit bmp to 24 bit bmp

5. Converting 16/24 bit image to 8 bit

6. Help on manipulating 24-bit colors from bitmap

7. 24 bit color bitmap creation

8. IMAGELIST and 24 by 24 bit icons...

9. 24-bit bmp to 1-bit conversion

10. bmp 24-bit to 1-bit conversion

11. 24 bit BMP to 8 bit BMP

12. 24-bit to 8-bit bitmaps

 

 
Powered by phpBB® Forum Software