0

This is what xdd reads

this is what the picture looks like

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.

0

I got similar errors when I was working through this pset.

I'd imagine there's a problem with how C rounds numbers down to integers, since the ratio of new size to old size doesn't appear to be an integer.

But without seeing code it's hard to say.

0

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?

You must log in to answer this question.

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