image

A constructor function that creates an image with the given length, width, and format. By default, all parameters are 0, and the format is represented by the "P6" value, which corresponds to an image with a P6 format.

  1. PixMapFile image(size_t width, size_t height, PixMapFormat pmFormat)
  2. PixMapFile image(size_t width, size_t height, string pmFormat)
    image
    (
    size_t width = 0
    ,
    size_t height = 0
    ,
    string pmFormat = "P6"
    )

Parameters

width size_t

Width of image as size_t value.

height size_t

Height of image as size_t value.

pmFormat string

Image format as string

Typical usage:

auto img = image(20, 20, "P3"); 	// creates image with P3 format type

Meta