0

In this pset we have to keep track of both the small image and large image paddings. I understand how to calculate the padding for the large image but for the original small.bmp do I use the formula:

padding = (4 - (bi.biWidth * sizeof(RGBTRIPLE)) % 4) % 4;

or do I have to do something like this:

 // set paddingInfile to 0
    // for every byte in the infile image
        // if byte is 0X00
            // add 1 to paddingInfile
1

The formula is essentially the same for any file. The key is knowing that you must use the biWidth for that file.

If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .