Crop image data test

Starting with a 5 x 4 array but as a 20 element 1D array. Pick a subset 3 x 2 or other smaller array and extract the data, but also as a 1D Array.


I am trying to visualize the issue of cropping a RGB565 byte image, I will try to crop a 160 x 120 x 2bytes raw data array, into a 32 x 32 x2bytes raw data array The crop coordinates can be in the top left but would be nice to crop from anywhere. The following is an integer equivalent to get an understanding of the issues.

Make Array Col:
Make Array Row:


Crop Start Col:
Crop Start Row:
Crop Width:
Crop Height:





...


...