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 Professional Discussion / What is the data format used by Make Bitmap/Image From Memblock

Author
Message
Mistrel
Retired Moderator
20
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 18th Mar 2010 01:57
The manual says:

Width(DWORD), Height(DWORD), Depth(DWORD), Data(BYTES).

Is "data" just sequential RGB DWORDs?

Rudolpho
20
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 18th Mar 2010 02:00
Yes, for 32-bit depth. Not sure about the other formats; 16-bit is probably A1R5G5B5 or R5G5B5A1.

BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 19th Mar 2010 00:15
it's 4 sets of 8 bytes - BGRA - for 32 bit images.

If you grab the backbuffer as an image to a memblock, the rules change. You get extra data at the end of each line, which you get the length of using GET BACKBUFFER WIDTH()

Mistrel
Retired Moderator
20
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 19th Mar 2010 00:51
Thanks for the clarification, BatVink.

Login to post a reply

Server time is: 2026-07-26 23:40:59
Your offset time is: 2026-07-26 23:40:59