View Single Post
Old 8th September 2015, 17:08   #2  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
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.
feisty2 is offline   Reply With Quote