p0is0n
Still Fresh
Hi,
What i want to do is to load in a bitmap, then check the colour value of each pixel in the bitmap.
I know that a SDL_Surface can return a void pointer to the pixel data, but after that i'm kinda lost :huh:
My question is how would i go about getting the pixel colour data from a bitmap loaded into SDL?
I'm guessing i need to cast the void pointer returned by "sdlSurface->pixels" to something, but as i said, i am completely lost here.
If anyone can help explain to me how this would be done, or point me in the direction of some material that could help, it would be much appreciated.
Thanks in advance!
What i want to do is to load in a bitmap, then check the colour value of each pixel in the bitmap.
I know that a SDL_Surface can return a void pointer to the pixel data, but after that i'm kinda lost :huh:
My question is how would i go about getting the pixel colour data from a bitmap loaded into SDL?
I'm guessing i need to cast the void pointer returned by "sdlSurface->pixels" to something, but as i said, i am completely lost here.
If anyone can help explain to me how this would be done, or point me in the direction of some material that could help, it would be much appreciated.
Thanks in advance!