Board index » cppbuilder » Want to know something on 16-bit and 32-bit color-depth?

Want to know something on 16-bit and 32-bit color-depth?

Hi all,

Who can tell me the relationship or correspondance between
the bits of a pixel and the R, G, B components in these two
modes.

Any ideas are welcome.
Answers both here and to my email address are much appreciated.

Sun Jiangang
jg...@email.bnu.edu.cn

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum

 

Re:Want to know something on 16-bit and 32-bit color-depth?


Quote
jg...@email.bnu.edu.cn wrote:
>  Hi all,

>  Who can tell me the relationship or correspondance between
>  the bits of a pixel and the R, G, B components in these two
>  modes.

>  Any ideas are welcome.
>  Answers both here and to my email address are much appreciated.

For 16-bit I think it is

15                    0
bbbbbggggggrrrrr

With 6 bits of green. I think the order of red and blue is correct I
could not be sure from the code I have.

15-bit has 5 bits of green and the top bit is unused (not very
common).

Robert Chafer

Re:Want to know something on 16-bit and 32-bit color-depth?


Quote
> Who can tell me the relationship or correspondance between
> the bits of a pixel and the R, G, B components in these two
> modes.

For 16bit colors, in bits in a WORD (16bits):

15 ........... 0
xRRRRRGGGGGBBBBB

For 32bit colors, in bytes in a DWORD (32bits):

00 RR GG BB

For more complete info, look up BITMAPINFO in the win32.hlp file.

+===================================================+
| Jonathan Arnold (mailto:jdarn...@buddydog.org)    |
| Senior Engineer           Roger Wagner Publishing |
| http://people.ne.mediaone.net/jdarnold            |
+===================================================+

"There is no psychiatrist in the world like a puppy{*word*180}ing your
 face." -- Ben Williams

Re:Want to know something on 16-bit and 32-bit color-depth?


  Windows bitmaps uses 0RRRRRGGGGGBBBBB and 00 RR GG BB but some
  image formats like TGA uses the most significant bit/byte as
  an alpha channel, which means that when it's 0 it's the own
  color, but when it's 1/FF it's complete transparent

  Wenderson Teixeira

Re:Want to know something on 16-bit and 32-bit color-depth?


Quote
In article <6p3j3q$vs...@nnrp1.dejanews.com>, jg...@email.bnu.edu.cn wrote:
>Hi all,

>Who can tell me the relationship or correspondance between
>the bits of a pixel and the R, G, B components in these two
>modes.

>Any ideas are welcome.
>Answers both here and to my email address are much appreciated.

By default,

16: 5 bits each with one unused bit
32: 8 bits each with one unused byte

However, an optional bitmask can be used to allow different bit combinations.

John - N8086N [Former?] Republican
------------------------------------------------
The Republican Leadership has stipped out
almost all the worker protections from the
House Bill. Tell the Republicans that you are
going to vote a straight Democratic ticket if
they approve this law.

The US Senate (The finest bunch of men money can
rent) passed the "American Competitiveness Act"
[S. 1723]. Once again, money wins out over
national interests. This bill allows you to be
fired and replaced by foreign workers in the US.

YOUR JOB IS AT STAKE! Write your congressman to
oppose the "American Competitiveness Act" when
it comes to the House.

Newt Gingrich 202/225-4501 Fax 202/225-4656
{*word*106} Armey 202 225-7772
------------------------------------------------
EMail Address:
|m.i.a.n.o @    |
|c.o.l.o.s.s.e.u.m.b.u.i.l.d.e.r.s.|
|c.o.m.|

Re:Want to know something on 16-bit and 32-bit color-depth?


In article <6pdeqa$s7...@oak.prod.itd.earthlink.net>,
  n...@null.xv (Octavius) wrote:
Quote
> In article <6p3j3q$vs...@nnrp1.dejanews.com>, jg...@email.bnu.edu.cn wrote:
> >Hi all,

> >Who can tell me the relationship or correspondance between
> >the bits of a pixel and the R, G, B components in these two
> >modes.

> >Any ideas are welcome.
> >Answers both here and to my email address are much appreciated.

> By default,

> 16: 5 bits each with one unused bit
> 32: 8 bits each with one unused byte

> However, an optional bitmask can be used to allow different bit combinations.

Hi,
Can you talk on bitmask and bit combinations in a bit detail.

- Show quoted text -

Quote

> John - N8086N [Former?] Republican
> ------------------------------------------------
> The Republican Leadership has stipped out
> almost all the worker protections from the
> House Bill. Tell the Republicans that you are
> going to vote a straight Democratic ticket if
> they approve this law.

> The US Senate (The finest bunch of men money can
> rent) passed the "American Competitiveness Act"
> [S. 1723]. Once again, money wins out over
> national interests. This bill allows you to be
> fired and replaced by foreign workers in the US.

> YOUR JOB IS AT STAKE! Write your congressman to
> oppose the "American Competitiveness Act" when
> it comes to the House.

> Newt Gingrich 202/225-4501 Fax 202/225-4656
>{*word*106} Armey 202 225-7772
> ------------------------------------------------
> EMail Address:
> |m.i.a.n.o @    |
> |c.o.l.o.s.s.e.u.m.b.u.i.l.d.e.r.s.|
> |c.o.m.|

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum

Other Threads