0

Resize fails in Check50 but 1x1 pixel images work. I've compared the outcome with the staff implementation and it's the same.

[removed code per academic honesty guidelines]

2
  • Have you tried working with a larger image, like small.bmp or smile.bmp? The 1x1 image simply doesn't have enough data to validate whether the program is working. The program can be seriously flawed and yet copy a single pixel over and over successfully.
    – Cliff B
    Commented Dec 20, 2016 at 20:30
  • Yes, it works. I tried with the 1x1 because of the check50 test case.
    – italo
    Commented Dec 20, 2016 at 21:27

1 Answer 1

1

Padding should be 0x00. You are writing 0xff in your copied rows.

To find this, you should resize an image using the staff version and then with your version, and then run diff on the 2 files. For this pset, testing "visually" will never pick up many of the issues. Use xxd or peek or diff as explained in the pset.

You must log in to answer this question.

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