Archived

This topic is now archived and is closed to further replies.

popcorn

Explain the process of blitting to me

Recommended Posts

Hi can anyone explain to me exactly what happens during blitting? For example if I was blitting a bitmap image what actually happens. At the moment I would imagine something like this: 1. First of all the bitmap(or other file) image is loaded into memory and you need a variable to store the address of where the start of the bitmap is in memory. 2. You then have a area of memory to represent the screen which also requires a variable to store the start address of the screen. 3. A bitmap consists of pixels made up of red, green and blue and an alpha value. In total this is 32bits(4 bytes). I would imagine that all the bytes that make up the image are then copied to the screen memory. 4. The image is somehow displayed on the monitor by reading the area of memory that represents the screen. Can you tell me if I am correct or not.

Share this post


Link to post
Share on other sites
Yes that is bassically correct. Also if the destination is bigger than the source then you get a stretch blt. For a 1:1 blit hardware acceleration makes it fast.

Share this post


Link to post
Share on other sites
It''s not possible to access that area of memory directly is it? You must use an API like DirectX and OpenGL etc which provide their own datatypes that represent the area of memory like the screen.

Share this post


Link to post
Share on other sites