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 PixMapFormat.PPM_BINARY 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)

Parameters

width size_t

Width of image as size_t value.

height size_t

Height of image as size_t value.

pmFormat PixMapFormat

Image format as enum PixMapFormat

Typical usage:

auto img = image(20, 20, PixMapFormat.PPM_TEXT); 	// creates image with P3 format type

Meta