What could I have been doing wrong? The code works is I resize small to 4X4.It even clears 5 out of * tests. Please help.
That image looks like you've got your
SEEK_CUR pointing at the wrong bits in the input file. Since it works fine resizing to 4x4, my guess is there is something wrong with the padding. Here are some things to check:
- Are you adding the right amount of padding for the new image?
- When you move the file pointer back, are you taking into account the padding in the input file?
- What about the number of bits each triple needs?