Question: Language using here is C code: #include #include #include //You may add/modify/remove structs typedef struct pixel_t pixel_t; struct pixel_t { uint8_t red; uint8_t green; uint8_t
Language using here is C


code:
#include
//You may add/modify/remove structs
typedef struct pixel_t pixel_t;
struct pixel_t { uint8_t red; uint8_t green; uint8_t blue; uint8_t empty; };
int main(int argc, char** argv) { // TODO return 0; }
Colour Palette You are tasked with writing a program that will discover and index the colour palette of an image by iterating through image data and extract the colour value. The colour value is represented by an unsigned integer value. It is recommended you use stdint.h and utilise uint8 t or uint32 t for reading in the data. We also recommend you implement this program using a linked list or use realloc. The program will take in a filename from the command line. /index image If no argument is specified, the program should respond with: No Filename Specified f the file does not exist, your program needs to respond with File Does Not Exist The file format is a type of bitmap image in binary format. The top of the file will specify the width and height of the image as well as a 2 byte magic number to confirm that it is a valid type. Each 4 bytes in the image data corresponds to 1 pixel in the image 10 Width: 4bytes Image Data height: 4bytes magic: 2 bytes 10 bytes width height 4bytes
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
