The padding functions set pixels in a border outside the image area. It is the caller's responsibility to ensure that the border is within the allocated area. There are three different kinds of padding functions:
The first variant is used to set all alignment pixels so that functions reading them produce a correct result. The other two are used to set the pad pixels around an image for functions that need padding, e.g. spatial filters. Note that the number of pad pixels to the left and right that are actually set is at least the specified number. The functions may set all pad pixels up to the nearest alignment boundaries.