A constructor for creating an image with given dimensions (length and width) and starting color for pixels. By default, all values are zero, and black (i.e: RGBColor(0, 0, 0)) is used as the starting color.
Returns actual height of image as size_t value
Returns actual width of image as size_t value
Returns the entire internal one-dimensional pixel array of the image.
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)
Resizing an image according to its given length and width. Note: If the length and/or width are smaller than the original values, then a literal cropping to the desired dimensions will be performed (not interpolation or approximation, but real cropping!). If the size parameters are larger than the original ones, then the image size will be increased by adding the default color to the end of the image (real array addition will be performed, not interpolation).
Getting a color value from an individual pixel through a two-index indexing operation. Note: It is allowed to use as indices values greater than the length and width (or less than 0) as indices, since the values will be converted to the actual length of the image array.
Assigning a color value to an individual pixel through a one-index indexing operation. Note: It is allowed to use an index greater than the actual length of the array or less than 0, since it is bound to the real length of the internal array of the image.
Assigning a color value to an individual pixel through a two-index indexing operation. Note: It is allowed to use as indices values greater than the length and width (or less than 0) as indices, since the values will be converted to the actual length of the image array.
Assigning a color value to an individual pixel through a one-index indexing operation. Note: It is allowed to use an index greater than the actual length of the array or less than 0, since it is bound to the real length of the internal array of the image.
The string representation of the image. Returns a string representing the image as a two-dimensional array of RGBColor objects.
A class that provides a convenient interface for working with images. Represents a one-dimensional array.