get pixel color from screen *HELP*

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
SpaceMonkey
Posts: 8
Joined: Wed Apr 02, 2008 5:15 am

get pixel color from screen *HELP*

Post by SpaceMonkey »

My problem should be simple to solve, I just cant find the answer anywhere (yes, I tried the search thing..)

I would like to get the pixel color from de screen.
the perfect-world-version:
color = getPixelColor( x, y);

Can anyone help me with this?

Thanks
romero126
Posts: 200
Joined: Sat Dec 24, 2005 2:42 pm

Post by romero126 »

Code: Select all

Color getPixelScreen(int x, int y)
{
	Color* vram = getVramDrawBuffer();
	return vram[PSP_LINE_SIZE * y + x];
}
Vincent_M
Posts: 73
Joined: Tue Apr 03, 2007 4:16 am

Post by Vincent_M »

check your previous post. I aswersd it a while ago...
SpaceMonkey
Posts: 8
Joined: Wed Apr 02, 2008 5:15 am

Post by SpaceMonkey »

Thanks allot!

Sorry for second post, I wanted to explain where I needed it for (maybe it would make a difference in code)
Post Reply