Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / if dbc 555 format or 565 format when it comes to 16 bit

Author
Message
pictionaryjr
15
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 19th Dec 2009 04:04
I'm aware that 16 bit could be 4444 format, 565 format, 555 format

4444 format is for macintoshes where they have 4 bits of red, green, blue, and alpha

555 format is where they have 5 bits of red, green, and blue, and 1 alpha bit

565 format is where they have 5 bits of red and blue, and 6 bits of green since it is the color that stands out most to a person's eye


I'm almost positive that DBC doesn't use 4444 format lol so I was curious if anyone knew which one it would be. I thought dbc didn't have any alpha values so i tried 565 and it doesnt appear to be working
Kevin Picone
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 19th Dec 2009 04:26
DBC is using whatever format the driver supports. So some machines (well most) will prefer and use the 565 format in 16bit modes, while a select few will use 1555 format. The Alpha bit is redundant.

Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 19th Dec 2009 04:46
@pictionary
You can test it with the following:



A memblock will hold the colors for whatever image you convert it from in whatever mode DBC is in. The colors will be in the format according to your device. Since the green bit length is what generally changes, you can test it against a full green pixel to see what it's value is. 5 set bits for green would look like
1111100000 = 992

6 set bits for green would look like
11111100000 = 2016

Enjoy your day.

Login to post a reply

Server time is: 2024-04-20 03:56:38
Your offset time is: 2024-04-20 03:56:38