The base image library for the pixicog project.
The core data structure of pixicog.
Parameters
width
Integer?height
Integer?numChannels
Integer?
Examples
// create an RGB image that is 10 pixels wide and 5 pixels tall
Image img(10, 5, 3);
// create an RGBA image that is 10 pixels wide and 5 pixels tall
Image img(10, 5, 4);
// create an image with no associated data
// you must call img.setup(...) before using
Image img();
Returns the shape of the Image as a vector
Returns std-vector<int>
Overrides the internal data of a Image
Parameters
w
Integer the width of the image, must be greater than 0h
Integer the height of the image, must be greater than 0nc
Integer the number of channels. Must be 1, 3, or 4.
Returns void
Gets the value of a single channel for a single pixel
Parameters
x
Integer the x coordy
Integer the y coordc
Integer the channel number
Returns unsigned-char
Set a specific channel for one pixel
Parameters
x
Integer the x coordy
Integer the y coordc
Integer the channel numberv
unsigned-char the new value
Returns void