Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RGBTRIPLE* array_copy[bi.biWidth];
- fread(&triple, sizeof(RGBTRIPLE), 1, inptr);
- int count = 0;
- //add pixels for times n amount - WRITE TO ARRAY N TIMES
- while (count < n)
- {
- array_copy[k] = &triple;
- count++;
- k++;
- }
- //write array copy to outfile twice vertically
- for (int p = 0; p < n; p++)
- {
- //write array_copy to outfile
- for (int x = 0; x < bi.biWidth; x++)
- {
- fwrite(*array_copy, sizeof(RGBTRIPLE), 1, outptr);
- }
- //add padding to horizontal row
- for (int j = 0; j < outfilepadding; j++)
- {
- fputc(0x0, outptr);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement