Image


Description:

[ CCode ( has_construct_function = false ) ]
public Image (int width, int height, ImageBaseType type)

Creates a new image with the specified width, height, and type.

Creates a new image, undisplayed, with the specified extents and type. A layer should be created and added before this image is displayed, or subsequent calls to [ctor@Gimp.Display.new] with this image as an argument will fail. Layers can be created using the [ ctor@Gimp.Layer.new] command. They can be added to an image using the [method@Gimp.Image.insert_layer] command.

If your image's type is INDEXED, a palette must also be set with [method@Gimp.Image.set_palette]. An indexed image without a palette will output unexpected colors.

Parameters:

width

The width of the image.

height

The height of the image.

type

The type of image.

Returns:

The newly created image.