Question: Please in C , and please explain it 7.4 Lab Exercise 7a: Pixel struct and array Write and debug the code in Visual Studio. Upload
7.4 Lab Exercise 7a: Pixel struct and array Write and debug the code in Visual Studio. Upload your Source.c program for grading. You may upload unlimited times This program uses the 24-bit RGB color pix (pixel) struct native to Windows. It consists of 3 unsigned chars, red intensity stored in the most significant, green in the middle, and blue in the least significant. Below are some sample definitions: typedef unsigned char BYTE; /max value of 255 means highest intensity for that color define MAXBYTE 255 typedet struct RGBTRIPLE //from WinGDI.h BYTE b BYTE g: BYTE r pix: const px RED- ( 0,0,MAXBYTE ); //could also express as {o, o, oxft) Your program will create an (1 dimensional) array of pix, fill it with color, and print it out as hexadecimal text. Though we use a 1d array to store the pixels, we will treat it as a 2D-array when printing it out Then it will call an image processing function to overwrite the array with is photographic negative, and print it again Starting with the template code provided below, and complete a program that will (1) Create an array of pix image MAX, where MAX is a predefined constant 500 (2) Ask the user for width and height of an image to create, and read in those values Make sure the width height
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
