The Student Room Group

Bitmapped - Memory requirements help =(

Currently stuck on a question.. looks pretty simple but I can't get my head around it.

16 bits per pixel = 2 bytes per pixel this = how many bytes
according to my AQA book, a minimum of 128 bytes are needed for the bitmap.
An idea I had of how the got 128 was that they did 4^4 but how they got this I don't know.

Can some 1 please explain to me how you would work this out?
Reply 1
Ok, well first you need to know the size of the image and pixels per inch or anything like that.
Or just how many pixels there are.
16 bits per pixel would be 2 bytes per pixel.
If they say 128 bytes are needed for the bitmap, divide this by 2, to get the total amount of pixels... to get 64. That is how many pixels total on a 128 byte bitmap...
Square root it to get the grid size if its equal in x and y directions to give you a 8 by 8 grid of pixels... not 4 by 4. As 8 by 8 will give you 64 pixels, times 2 bytes gets you 128 bytes.
But from what i work out in your post, they haven't given you the image size? Or do they want you to work it out by giving you the overall memory requirement for the image?

Latest

Trending

Trending