CreateImage()

Syntax

Result = CreateImage(#Image, Width, Height [, Depth])
Description
Create an empty image (with black background) which can be used to do rendering on it. If #PB_Any is used as '#Image' parameter, the new image number will be returned as 'Result'.

If 'Depth' is omitted or set to #PB_Image_DisplayFormat, the image format is taken from the desktop format. Valid 'Depth' values can be: 1, 2, 4, 8, 16, 24 and 32 bits. When manipulating true colors formats, and want save back the modifications without color information loss, it's advised to use the 24 or 32 bits values. If the images are only used for displaying on the screen, #PB_Image_DisplayFormat will provide faster performances.

You can use the several other functions for acting with the created image:
StartDrawing() with ImageOutput() to draw on the created image
CopyImage() to create another image from the actual one
GrabImage() to create another image from a given area of the actual one
DrawImage() with ImageID() to draw the image on actual output channel.
ImageGadget() for displaying image on an application window
ButtonImageGadget() for creating an image button on an application window

Note: the image size is currently limited to 8192x8192 pixels (if the available memory allow it).

Supported OS

Windows, Linux, MacOS X

<- CopyImage() - Image Index - FreeImage() ->