Gimp.Image.new

function new(width: Number(gint), height: Number(gint), type: Gimp.ImageBaseType): Gimp.Image {
    // Gjs wrapper for gimp_image_new()
}
  

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 Gimp.Display.new with this image as an argument will fail. Layers can be created using the Gimp.Layer.new commands. They can be added to an image using the Gimp.Image.prototype.insert_layer command.

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

width

The width of the image.

height

The height of the image.

type

The type of image.

Returns

The newly created image.