How to pixelate a binary (P6) PPM file
问题 I am struggling to pixelate an image which is made up of RGB values stored in a binary (P6) PPM file. The steps to pixelate the image are as follows: Read in the binary data and store it in a 1-dimensional array Iterate through the data stored in this array, in cells of size 'c' (row x columns). This variable 'c' can be changed by the user, but for this program it's currently set to int c = 4; meaning it iterates through pixel data in block dimensions of 4 x 4 Now find the average colour