Skip to main content
3 votes

in pset4, resize: How does the structs declared in 'bmp.h' know which bytes to get the data from?

How does the structs declared in 'bmp.h' know which bytes to get the data from? The resize program works with the BMP file format which has a few characteristics which need to be altered, namely ...
Tarmyniatur's user avatar
2 votes

in pset4, resize: How does the structs declared in 'bmp.h' know which bytes to get the data from?

fread does really tell the computer where to start getting the data: // read infile's BITMAPFILEHEADER BITMAPFILEHEADER bf; fread(&bf, sizeof(BITMAPFILEHEADER), 1, inptr); // read infile's ...
DinoCoderSaurus's user avatar
1 vote
Accepted

CS50 pset3 i want to resize this image, code is working for some and not for others? Can anyone tell me whats the problem?

The problems revolve around how the pointer is moved at the end of each line in the input file and how padding is added to the output file. There are two issues. First, the output file padding. It ...
Cliff B's user avatar
  • 69k

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