/* imageUtils.h */ //#include "colorUtils.h" /** * A structure that represents a single pixel value using * the RGB (red-blue-green) color model. Each integer * value is in the range [0, 255]. */ typedef struct { int red; int green; int blue; } Pixel; /* Loads an image file specified by the given file name. The height and width are indicated in the two pass-by-pointer variables. The image is returned as a two-dimensional array of Pixel values of dimension (height x width) where the pixel at [0][0] corresponds to the top-left most pixel value. */ Pixel **LoadImage(const char *filePath, int *height, int *width); /* Saves an image (same format as LoadImage() and is of the given height x width) to the file specified by the given name. */ void SaveImage(const char *filePath, Pixel **image, int height, int width); /* Creates a deep copy of the given image of the given height/width, returning the new copy as a 2-dimensional array of pixels. */ Pixel **CopyImage(Pixel **image, int height, int width); /* Convert image to grayscale using specified mode. */ void ImageToGrayScale( Pixel **image, int height, int width, Mode m ); /* Extract specific colors */ void ExtractRGB( Pixel **image, int height, int width, Mode m );