I am getting an error at IDE "Invalid or unsupported file format" for an input "n" equal or greater than:
- 68 for small.bmp
- 36 for smiley.bmp
- 27 for large.bmp
I also tried to peek
with staff's solution, and everything at headers seems to be OK.
Edit:
...
// iterate over infile's scanlines
for (int i = 0, biHeight = abs(bi.biHeight); i < biHeight; i++)
{
...