{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

In other words the function should consider a sub

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: o, if you wanted to access the 2nd channel (green) of the pixel at row 30 and column 50 in the image im, you would do: imData[30][50][1] Once you are done with this function, test it in your main function with the following arguments: bool x = colorMatch(83, 372, 11, 22); bool y = colorMatch(209, 399, 9, 49); The value of x should be true, and y should be false. Task 2 – Draw Rectangle For this task, set your image output file name to “output2.bmp”. In this task, you will write a function to draw a white rectangle on the image im. Your function should have the following signature: void rectangle(int r, int c, int w, int h); The location (r,c) should be the row and column of the bottom- left corner of the rectangle, and w and h will be the width and height respectively. To draw the rectangle, you should paint the corresponding pixels white. Remember...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online