I managed to complete the pset4/resize, but am having difficulty understanding the concept behind how it works. That gap is showing up in my attempt at pset4/jpg.
fread as far as I know doesn't tell the computer where to begin getting the data(e.g. the 40 bytes in BITMAPFILEHEADER, which begins after byte 14).
Is it by the datatype, BITMAPFILEHEADER?.. if so, are we just lucky microsoft specified and named the datatype for us..?
What if we are trying to do the same for Jpg, but they don't have structs pre-defined like microsoft did for .bmp files. How do I create, then access them?
To sum it up, my question is: How does the structs declared in 'bmp.h' know which bytes to get the data from?