I\m really stuck in the formula for horizontal resize.For my new padding if i enter 4 for (n) i get for my new padding answer 1, is that correct?
fpos_t startline;
for (int a = 0, biHeight = abs(bi.biHeight); a < biHeight; a++)
{
for(s = 0; s < n; s++)
if s < 0
fgetpos(inptr, &startline);
fsetpos(inptr, &startline);
// iterate over pixels in scanline
for (int j = 0; j < bi.biWidth; j++)
{
// temporary storage
RGBTRIPLE triple;
//verticaly works...
}
// skip over padding, if any
fseek(inptr, -padding, SEEK_CUR);
// then add it back (to demonstrate how)
for (int k = 0; k < newpadding; k++)
{
fputc(0x00, outptr);
}
}
So it go's from 0 to abs height and if it ends should return me start position and write it, but i've got only 3 lines. Where I make mistake ??
This is what i get from peek check:
And when i check with xxd with student version when i resize with 4 i get this:
I'm sure that something is skipped, but I can't found my mistake. Thanks!