I'm rather new to coding so I'm not sure if this is a really obvious question or not. What I have is an ordered list of bytes that represent pixels and depth data related to those pixels, so when returned into a box they create an image. What I'm trying to do is isolate a smaller rectangle of those bytes into a new byte array.
So basically I want to skip a large amount of the bytes at the start of the array (the ones completely above the smaller rectangle section), as well as the first lot on the left of it, then add one row of the length of the smaller box to the new array, then skip the ones on the right of the box, skip the left side on the next line down, add the length, skip the right and repeat it all until I reach the end of the box.
I really hope that bad explanation makes sense to someone. I have no idea how to go about doing this. Any help would be really appreciated!
Thanks!