Skip to content

padding for scanlines #45

Answered by Ank1taS
Ank1taS asked this question in Q&A
Discussion options

You must be logged in to vote

The padding bytes are the bytes following the pixels of a scanline (A scan line is one line, or row, in a raster scanning pattern). Each scan line must end on a 4-byte boundary, so one, two, or three bytes of padding may follow each scan line.
Padding bytes (not necessarily 0) must be appended to the end of the rows in order to bring up the length of the rows to a multiple of four bytes. When the pixel array is loaded into memory, each row must begin at a memory address that is a multiple of 4. This address/offset restriction is mandatory only for Pixel Arrays loaded in memory.
For file storage purposes, only the size of each row must be a multiple of 4 bytes while the file offset can be …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by H1manshu21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
1 participant