No, you get data from one row, column 0 to column 48*3+padding because that’s how BMP stores information. I need one column, row 0 to row 48, which is the same as rotating a BMP file 90 degrees in either direction.
It’s easy to do this
for (row = 0; row < BMPHeight; row++) {
bmpFile.read(…, 144);
}
which will get you the data per row, which is not what I need.
It’s not as easy to do that per column because you have to read data three columns at a time for each row:
row 0 -> column 0-2
row 1 -> column 3-5
row 2 -> column 6-8
etc., etc.
You’re nesting two loops, one for the column and another for the row inside of it and reading the data one at a time. You can not perform a single .read(…) at that point. Regardless of MCU, an SD.read() is expensive and takes time, so the less time one has to do that, the better. One single .read() that fills all 144 bytes in the array is way better than 48 .read()s to fill the same array.
As I said, rotating the BMP file will get me what I need and the columns would have them become rows and you read in a full row.
There is no reason to switch MCU, an AVR CAN do the calculations to do what I need without having to rotate the image, however it’s simply not worth the time to do because a) rotating the image is much easier, or b) preprocessing it into a custom binary file will get the data in the correct format that I need. And since I’m already doing (b) well before I threw BMPs in the mix, I’m sticking with it. So there’s no need to add anything complicated to the mix. It’s already done.
This is a moot point as it’s already been resolved, and again, switching MCU isn’t magically going to solve the problem: the same calculations will still need to be done, and the same SD.read() will still need to be performed.