Bitmap % colors

Bitmap % colors

Post by Eusebi » Fri, 23 May 2003 01:25:29



Is there a way to find out the percentage of certain
colors of a picture box without checking pixel by pixel
its color ?

I have a 24 bit bitmap and I paint it with .circle on
MouseMove. Would it be any help if the number of colors
would be between 6 and 8 ?

Please help me !!!

Thanks in advance,
Eusebio.

 
 
 

Bitmap % colors

Post by Mike D Sutto » Fri, 23 May 2003 01:43:33


Quote:> Is there a way to find out the percentage of certain
> colors of a picture box without checking pixel by pixel
> its color ?

Posting the question twice doesn't mean you're going to get any more
responses to it..

Quote:> I have a 24 bit bitmap and I paint it with .circle on
> MouseMove. Would it be any help if the number of colors
> would be between 6 and 8 ?

Not really, you could use an 8-bit Bitmap instead which would mean you have
only 33% of the data to parse of a 24-bit Bitmap, but you'd still need to go
through pixel by pixel.
Hope this helps,

    Mike

 - Microsoft Visual Basic MVP -

WWW: Http://www.mvps.org/EDais/

 
 
 

Bitmap % colors

Post by Eusebi » Fri, 23 May 2003 02:00:13


You're right and I think having a 8 bit bitmap would help
me solving the space problem ...

By the way, do you use MSN Messenger, it will help me
enormous to talk with you online ...


Eusebio.

Quote:>-----Original Message-----
>> Is there a way to find out the percentage of certain
>> colors of a picture box without checking pixel by pixel
>> its color ?

>Posting the question twice doesn't mean you're going to
get any more
>responses to it..

>> I have a 24 bit bitmap and I paint it with .circle on
>> MouseMove. Would it be any help if the number of colors
>> would be between 6 and 8 ?

>Not really, you could use an 8-bit Bitmap instead which

would mean you have
Quote:>only 33% of the data to parse of a 24-bit Bitmap, but

you'd still need to go
>through pixel by pixel.
>Hope this helps,

>    Mike

> - Microsoft Visual Basic MVP -

>WWW: Http://www.mvps.org/EDais/

>.

 
 
 

Bitmap % colors

Post by Mike D Sutto » Fri, 23 May 2003 03:42:35


Quote:> You're right and I think having a 8 bit bitmap would help
> me solving the space problem ...

You could still write out the vector image, but just use a device
independent 8-bit Bitmap internally (Note; Although you could use a 4-bit
Bitmap with 16 colours, because of the byte packing at 4-bit it's easier to
go through an 8-bit buffer and wouldn't require a bit-depth conversion for
extra speed.)

Quote:> By the way, do you use MSN Messenger, it will help me
> enormous to talk with you online ...

'fraid not, it's best to keep this on the newsgroups anyway so everyone
benefits.
Hope this helps,

    Mike

 - Microsoft Visual Basic MVP -

WWW: Http://www.mvps.org/EDais/

 
 
 

1. Bitmap Color Palette editing-VB4 16 bit 256 color

Hi,

        Does anyone know how I can edit Bitmap color Palette indexes or
the windows System color Palette.  I need to be able to pull this off
while in 16 bit windows, under 256 colors.  I also need to be able to
edit the color indexes almost instantaneously.
        Or preferably be able to fade or mix bitmaps colors together.
For example if I were to give a flash light effect to a dark room.  Or
the other way around as in shading a lighted room. I also need to work
with more then just black.  I hope to be able to apparently combine a
good number of colors together.  I used to be able to do this with 24
bit color.  I would use BitBlt to PAINT bitmaps onto other bitmaps
without masks, this would give sort of a ghostly effect or a lighted
effect.  I found that not to many people use more then 256 colors
though.  I also found that you can give this effect with 32 bit DLLs,
but I can't use PC speaker sounds with 32 bit DLLs.
        So, I hope some one can expand my knowledge on how bitmap colors
work in relation to each other, while in 16 bit windows, 256 colors.
Right now I just using VB 4.0 pro.

I would appreciate a decent quick example or two.


thanks in advance

    Sean ...

2. STOP ART FROM STEALING YOUR CREDIT!

3. Help: Splash bitmap colors don't look right

4. Questions about Lightwave

5. Bitmap color...

6. Newbie questions about Terrain Transformations

7. Bitmap color plane problem!

8. Can someone help me to.......

9. bitmap color depth

10. Bitmap colors in a resource file.

11. Bitmap color palette

12. Easy way to change a bitmap color to another

13. Reduce Bitmap Color