I'm currently working on resize, and I attempted to solve the part about updating the outfile's header info, but I think I messed up somehow. The bi2.biWidth and bi2.biHeight (see my code) get set to 0 from the beginning for some reason. Can someone explain why? https://gist.github.com/AProgrammerZ/5eadef75760c127201596178c6d481d1
The code reads the headers from the input file and immediately writes them to the output file without recalculating anything. Does that make any sense?
Then certain fields are recalculated for the output file. While they may be used in processing the image, they're not making it into the headers in the output file.
This is the headers issue. There are others that, would warrant a new question, if needed.
If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)
Note: this is based on code that may have changed since @Blauelf 's answer.