While i have not done this i believe there's methods with the Graphics class to get pixels. I presume you're using a canvas? If so do something like
int h = getHeight();
int w = getWidth();
for (int i = 0; i < h; i++)
{
for (int j = 0; j < w; j++)
{
screenpixelsarray[j] = Graphix.pixelAt(i, j);
}
}
I doubt this piece of code would compile even in a Canvas class as i do not know the name of the pixelAt() method, but it's the general idea.
Not sure how to go about storing this as an image once you got all the pixels in an array. A better place to ask something like this or look for information regarding this would probably be
http://www.j2meforums.com/forum/index.php?board=2.0
As it deals with MIDP and some of the people there are quite experienced with MIDP
MBliss