Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // rewind cursor to return previous byte in scanline
- fseek(inptr, -padding, SEEK_CUR);
- // iterate over images' widths and heights to resize vertically
- for (int l = 0; l < biHeight; l++)
- {
- // storage for the triples data
- RGBTRIPLE triple;
- for (int m = 0; m < img_width; m++)
- {
- for (int iii = 0; iii < n - 1; iii++)
- {
- // read from the infile and store in triple
- fread(&triple, sizeof(RGBTRIPLE), 1, inptr);
- for (int index = 0; index <= n - 1; index++)
- {
- fwrite(&triple, sizeof(RGBTRIPLE), 1, outptr);
- }
- fseek(inptr, -padding, SEEK_CUR);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment