letterbox

fun RgbImage.letterbox(size: Int, padValue: Int = 0): Letterbox

Resizes preserving aspect ratio to fit inside size x size, centring it on a canvas filled with padValue.