I don't know exactly where is the problem. Resize gives me a bunch of different colors when n % 4 !=0. Can you guys help me understand what I'm doing wrong?
// iterate over infile's scanlines
{
// resize vertically.
{
// iterate over pixels in scanline
{
// temporary storage
// read RGB triple from infile
// resize horizontally.
// write RGB triple to outfile
}
}
// skip over padding, if any
// then add it back (to demonstrate how)
}