» AviSynth is a powerful video FrameServer for Win32.

AviSynth Links:
»Learn to script
»Discussion fora
»Project page
»External filters

» You can add pages to this website immediately. No login required.
Edit this document

» AboutAviSynth




( Diese Seite in flag-germany.gif Deutsch )

AddBorders(clip clip, int left, int top, int right, int bottom [, int color])

AddBorders adds black (or specified color) borders around the image, with the specified widths (in pixels). YV12/YUY2 format only stores color information for every two pixels horizontally, so if you're processing in YV12/YUY2 mode, left and right must be even.

The color parameter is optional (added in v2.07), default=0 <black>, and is specified as an RGB value regardless of whether the clip format is RGB or YUV based.

Be aware that many lossy compression algorithms don't deal well with solid-color borders, unless the border width happens to be a multiple of the block size (16 pixels for MPEG).

You can use this filter in combination with Crop to shift an image around without changing the frame size. For example:

# Shift a 352x240 image 2 pixels to the right

Crop(0, 0, 350, 240).AddBorders(2, 0, 0, 0)

SourceForge Logo


Edit this document | View document history
Document last modified Wed, 20 Aug 2003 03:37:10