User talk:LeeroyLee337

Hello, I noticed that you made a change to an article, BMP_file_format. I reverted it back to the previous version as the calculation of the padding presented in that article was correct. I'm new to Wikipedia and relatively unfamiliar with its policy and conventions but I think it is good practice to leave an explanation on the talk page when one reverts another user's edits. As I condensed in my comment in the Revision history page, in a 24-bit bitmap, each pixel is encoded as a 3-byte sequence in the pixel array. Padding is performed to round up the size of each row to a multiple of 4 bytes, thus each row of the pixel array in a 3-pixel-width bitmap will require 3 bytes of padding to bring up the length of the rows to 12. Following is an example of the hexadecimal dump of a 3x3 24-bit bitmap (Windows DIB header BITMAPINFOHEADER) with pixel format RGB24, created with MS Paint:

00000000 42 4D 5A 00 00 00 00 00 00 00 36 00 00 00 28 00 BMZ.......6...(. 00000010 00 00 03 00 00 00 03 00 00 00 01 00 18 00 00 00  ................ 00000020 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00  ..$............. 00000030 00 00 00 00 00 00 27 7F FF 27 7F FF 27 7F FF 00  ......'..'..'... 00000040 00 00 27 7F FF 27 7F FF 27 7F FF 00 00 00 27 7F  ..'..'..'.....'. 00000050 FF 27 7F FF 27 7F FF 00 00 00                    .'..'.....

The first 54 bytes contain the bitmap file header and the DIB header. The Pixel array starts at offset 36h. The 24-bit pixel format stores 1 pixel value per 3 bytes, each byte representing the red, green and blue samples of the pixel (note that the actual order is inverted in the pixel array, samples are arranged in BGR order). I filled this bitmap file with a random orange colour (RGB #FF7F27). Three NULL bytes are appended to the end of each row to comply with the 4-byte alignment requirements. MS Paint uses 0x00 for padding, but other editors may use other values. I hope this explains the reason I reverted your edit. 79.20.130.22 (talk) 08:49, 18 November 2015 (UTC)