I am struggling with the vertical resizing using the recopy approach. I read a pseudocode in an answer to another question in this forum and am trying to code it. I feel I am near but something is not working. Could you help? Thank you very much
// iterate over infile's scanlines
for (int i = 0, biHeight = abs(BHold); i < biHeight; i++)
{
for (int j = 0; j < coeficiente; j++)
{
if (j != 0)
fseek(inptr, -BWold, SEEK_CUR);
// iterate over pixels in scanline
for (int k = 0; k < BWviejo; k++)
{
// temporary storage
RGBTRIPLE triple;
// read RGB triple from infile
fread(&triple, sizeof(RGBTRIPLE), 1, inptr);
//escribir n veces cada pixel
for (int l = 0; l < coeficiente; l++)
fwrite(&triple, sizeof(RGBTRIPLE), 1, outptr);
}
// agregar el nuevo padding
for (int k = 0; k < newpadding; k++)
fputc(0x00, outptr);
}
// skip over padding, if any
fseek(inptr, PDold, SEEK_CUR);
}