2
votes
Accepted
pset4- recover invalid or unsupported image format
Look at the following code:
fwrite(inptr, 512, 1, img);
Why are you writing something back to the input file?
Even if it was supposed to go to the output file, why would the same block be ...
1
vote
Problem with CS50 Pset3 Resize Less
You've declared a new header struct, but you never gave it any values
// write outfile's BITMAPFILEHEADER
BITMAPFILEHEADER outfile_bf;
fwrite(&outfile_bf, sizeof(outfile_bf), 1, outptr);
...
1
vote
Accepted
Problem with CS50 Pset3 Resize Less
Hmmm.....
After the code creates the output file headers, do you think it would be useful to load/copy the values from the input file headers into the output file headers?
// write outfile's ...
1
vote
Accepted
recover.c unsupported image format after opening
Looks like a typo in the fwrite statements. You want to write the block that was just read into buffer (not memCard).
1
vote
Accepted
pset4 resize, file format problem before resizing
Perhaps you should very carefully review the header fields that you are changing. Many have quite similar names, even the same name in both bi and bf headers.
You should also use the peek tool to ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
unsupportedformat × 7pset4 × 6
resize × 4
recover × 3
cs50x × 2
pset3 × 1
pset4recover × 1
resize-less × 1
invalid-image-format × 1