The _NEWIMAGE Function prepares a window image surface and returns the handle value.
- Minimum screen dimensions are Width& >= 0, Height& >= 1 measured in pixels.
- BPPmode& is either a QB type screenmode(0 to 2 or 7 to 13) or 256 colors or 32 bit(high color) compatible.
- If BPPmode is omitted, an image will be created in the same BPP mode as the current destination image.
- Valid LONG handle returns are less than -1. Invalid handles equal -1.
- You can create any sized window(limited by OS) using this function.
- It is IMPORTANT to free unused or uneeded images with _FREEIMAGE to prevent CPU memory overflow errors!
Example 1: Shrinking a SCREEN 0 text window's size:
Example 2: Creating an 800 by 600 window version of SCREEN 12 with 256 colors (text 36 X 100):
Example 3: Setting a SCREEN with _NEWIMAGE and page flipping in QB64.
SCREEN _NEWIMAGE(640, 480, 256), , 1, 0
See Example: SAVEIMAGE (Bitmap Screenshots)