1

When I try my resize program on small.bmp and enter 4 as n, it gives me a 12x12 picture that is all green, but instead of having the white little square in the middle it has a black rectangle on the bottom left corner of the picture.

I am using the re-copy method to print the vertical line. All my headers work as they should, I think, and my padding is calculated correctly. How should I fix this problem, and get it to print correctly?

1
  • There gotta be something wrong either with the headers or with the way you're resizing which is probably difficult to tell without seeing the code. However, if you're sure that the headers are okay, try using xxd to compare a resized bmp by your program against the staff's program see what happens!
    – kzidane
    Commented Oct 18, 2014 at 2:27

1 Answer 1

0

Kareem is probably right. Try using the 'peek' command to compare your solution with the staff's solution (explanation how to do it is somewhere in the guide/specification/testing section of the problem). I had a similar problem and it was ultimately because i was miscalculating header values which were correct in cases where there was no padding needed (i.e. by the smiley for many values) and then incorrect for others.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .