I want to take a picture of the upper half of my screen so I used the dbGetImage and dbSaveImage functions to get the top half then save it into my folder:
void PianoStaff::Screenshot() // piano staff is my class
{
dbGetImage(SCREENSHOT_IMAGE_ID, 0, 0, dbScreenWidth(), dbScreenHeight()/2); // gets the image of the upper half of screen
dbSaveImage("Screenshot.bmp", SCREENSHOT_IMAGE_ID); // saves image as Screenshot.bmp
}
Whenever I run this, it takes the right dimension of the screen however, all it exports is a picture of a blue rectangle. Furthermore, my window turns half blue whenever i run it:
before:

after:

screenshot image: