I have a problem with a coding assignment and am becoming clueless as to how to solve it.
I am working with PGM images and I have read the data and saved it into a buffer (2D array ex. data[width][height])
I have been asked to then transfer that data into an array of 2d arrays of size 8x8 for the 2d arrays and the number of arrays is width*height/64.
How would I go about storing the data from the 2D buffer into the array of 8x8 2D arrays?
Declare an 8x8 array of strings. Then copy the pixels in the 2D buffer into the array using a for loop
Comments
Leave a comment