2 votes
Accepted

Why is my cs50 resize not working?

There are a couple of issues here. First, the for loop nesting is in the wrong sequence. The outermost loop should be based on the height of the image, but that's the innermost loop. In addition, ...
Cliff B's user avatar
  • 68.8k
1 vote
Accepted

Pset 3 Resize less: Help needed with file size

I'll give you a big hint. The code is producing 3 extra lines of pixels in each output file, using a resize factor of 1, 2, or 3. Did you actually look at the raw data in the file, or just at the ...
Cliff B's user avatar
  • 68.8k
1 vote
Accepted

bfSize error in check50 PSET3 Resize (less)

Wouldn't it be more useful to write out the new headers after recalculating all the header values? ;-) If this answers your question, please click on the check mark to accept. Let's keep up on forum ...
Cliff B's user avatar
  • 68.8k
1 vote
Accepted

What's wrong with my Resize (Less) code? Pset3

So close, but I think you might be looking in the wrong place. Have you verified that your header values are all correct in the output file????????? Those values control how the image data is ...
Cliff B's user avatar
  • 68.8k
1 vote
Accepted

PSET3 Resize (more comfortable) do not understand why code is not working

I'd recommend using peek as mentioned in the problem description You would see that your output headers are the same as the input headers. You change cf/ci to match the dimensions of the output image,...
Blauelf's user avatar
  • 20.9k
1 vote
Accepted

PSET3 Resize (more comfortable), resizing f > 1 correctly, but pixels are different colors. Does not work when f < 1

Actually, no, the code doesn't work correctly at all. First, the header data is incorrect. Two fields are not calculated correctly. Second, even at resize of 1, the image output is incorrect. ...
Cliff B's user avatar
  • 68.8k
1 vote
Accepted

pset4 resize: setting bfSize and biSizeImage hexadecimal values

Well, that's an unusual way to try and do that. You're writing to the headers in the file! Seems like the hard way to update the headers. Don't you think it would be easy to read the headers into a ...
Cliff B's user avatar
  • 68.8k

Only top scored, non community-wiki answers of a minimum length are eligible