How to take a screenshot?Please help
How to take a screenshot?Please help
Hi! Could anyone help me on how to make a screenshot inside my own app?I know I can do this using psplink or other software,but I would like to have this functionality built in.Please tell me what code and libriary should I use to be able to make a screenshot and save it as bmp or png.Thanks!
Hi,
Obviously you need to include the png and graphics libs.
then this function that came from some sample, or somewhere else
here on ps2dev.org:
Cheers, Art.
Obviously you need to include the png and graphics libs.
then this function that came from some sample, or somewhere else
here on ps2dev.org:
Code: Select all
void saveScreen() {
int posX;
int posY;
Color pixel;
Color* vram = getVramDisplayBuffer();
Image* screenShot;
screenShot = createImage(480,272);
for (posY=0; posY<272; posY++) {
for(posX=0; posX<480; posX++) {
pixel = vram[PSP_LINE_SIZE * posY + posX];
putPixelImage(pixel,posX,posY,screenShot);
}
}
saveImage("ms0:/Snapshot.png",screenShot->data,480,272,PSP_LINE_SIZE,0);
freeImage(screenShot);
}