I know, I know. Bitmaps and Java. Ugh.
It's a small project I have to do. Thing is, I'm very limited here. (Can't use any mystic functions, or the like). So I'm having some trouble... Heh.
I had a bit of a hard time at the beggining, trying to understand the source code the one who asked me for the project gave me. Thing is, it was useless (it was too simple and didn't give me any useful information)..
I know my question will probably sound stupid,, but here goes anyway.
All images being read will be 24 bit bitmap, and 640x480. Now... I have a question.
Theoretically speaking, a standard non-compressed image that's 640x480, should weigh 640x480x3, right? being 24 bits, having 3 bytes per pixel.
And effectively, it does. However, I'm having second thoughts on how to obtain the array of pixels from a bitmap... The array of a size 640x480x3 would be too huge for java to handle. Not to mention it would then take AGES to parse it into three arrays for R G and B.
I thought about doing it line by line, 640 pixels at a time.
Am I doing something wrong? I'm loading byte by byte into an array. Therefore, i assume every three bytes I load is a full pixel.
Please, This is a bit urgent.
Thanks in advance to any useful information you could provide. I've already researched a lot, and haven't gotten to a full answer.