Help with bitmap

I have a bit of code here..my question is that why is it divisible by 4?


1
2
3
while((scanline_bytes + padding_bytes) % 4 != 0)
        padding_bytes++; 
    cout << "Each scanline has " << padding_bytes << " padding bytes at the end" << endl;
closed account (Dy7SLyTq)
its not... % takes the remainder of how much is left after 4 goes into it ie if scanlines % 4 == 0, then the if wouldnt execute because that means 4 went into it perfectly
Thank you!
Topic archived. No new replies allowed.