Function P2M8 (clip input)
{
w = input.width ()
h = input.height ()
w8 = int ((w + 4) / 8) * 8
h8 = int ((h + 4)/ 8) * 8
left = int ((w8 - w) / 2)
right = w8 - w - left
top = int ((h8 - h) / 2)
bot = h8 - h - top
return Padding (input, left, top, right, bot)
}
Function Padding (clip input, int "left", int "top", int "right", int "bottom")
{
w = input.width ()
h = input.height ()
output = input.PointResize (w+left+right, h+top+bottom, -left, -top, w+left+right, h+top+bottom)
return output
}
WARNING: ain't tested it... use it at ur own risk
Last edited by feisty2; 8th September 2015 at 17:15.
|