PixMapImage.array

Sets the inner pixel array of the image by feeding the outer array. The size of the array must be equal to the actual size of the image (i.e. the size of the given one-dimensional array must be equal to the product of the length of the image and its width)

  1. RGBColor[] array()
  2. void array(RGBColor[] image)
    class PixMapImage
    final
    void
    array

Throws

Exception if the length of the supplied array does not match the actual length of the internal array, as above.

Typical usage:

    PixMapImage pmi = new PixMapFile(2);
	RGBColor[] pixels = [new RGBColor(255, 255, 255), new RGBColor(255, 255, 255)];
	// set all pixels as white
	pmi.array(pixels);

Meta