News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Dibsection with more than 256 colors

Started by UPucker, August 01, 2005, 10:24:46 PM

Previous topic - Next topic

UPucker

OK I know this is a stupid question, but.......

I can already setup a dibsection with 256 colors,

How do I setup a dibsection with more than 256 colors?

What is the format of each pixel?

Also on a side note, how do I make a dibsection fullscreen? Or switch to a fullscreen mode and draw on it with dib?


hutch--

Hi UPucker,

Welcome on board. I moved your posting to the Campus so you would get more answers. The MASM32 subforum is for project related info.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

UPucker

Thanks. I know the pixels in a 256-dib are 4 bytes, aarrggbb. I was just wondering if switching

mov canvas.bmiHeader.biBitCount,32

will increase the color depth, and if so what the pixel format is?

Anyone?


raymond

When you create a 256-color DIB, you have to provide a color table for those 256 colors, each color consisting of 4 bytes each. Each pixel is then only 1 byte which is the index for the color in the table.

For a 32-bit DIB, you do NOT supply a color table. Each pixel must then consist of 4 bytes, 3 of them for the RGB levels.

If you want to have a "full-screen" window, simply use the POPUP style.

Raymond
When you assume something, you risk being wrong half the time
http://www.ray.masmcode.com

UPucker

Nevermind I figured it out. Thanks for the help.