getting pixel code

hi guys.

i had searched through internet but couldnt find much about it

lets say i have an image coded ARGB8888. and the image is 640*480 and i want to get the 381*109th pixel.

so i should get the ((640 * 108) + 381)th pixel. how can i get its data.

i m using SDL 1.2 and SDL 2.0

thx everyone in advance
Last edited on
am i not asking the right question???
closed account (S6k9GNh0)
How are you using SDL 1.2 and SDL 2.0?
If the question is directed at SDL, why not ask on their mailing list?
If all you wish to do is image manipulation via pixels, surely you can use a better method...
well firstly thanks for answering @computerquip

and secondly i was searching through SDL wiki for functions. and googling for getting-pixel examples. and i mixed them then searched google for a SDL example(seriously how dumb i am)

and you know, the guy says he cant trust wiki anymore about being up-to-date

here is the link if you want the solution
http://comments.gmane.org/gmane.comp.lib.sdl/59610
Last edited on
@computerquip sth festers my mind. you said
computerquip wrote:
surely you can use a better method...


what did you mean exactly the algorithm or sth else than via pixels??
Topic archived. No new replies allowed.