Wilbert
11th April 2002, 09:25
I'm checking the avisynth-script of smart resize (see below) that I found somewhere on the internet. I encountered the following problem:
The borders (when letterboxing) can be given any color. For example: black 0x000000, red 0xff0000 or blue 0x0000ff.
We have for example:
VD_SmartResize(320,240,1,4,320,320,0,"0 1 1 4 320 240 100 0 0 0 0 4 4 2 2")
The color argument 0 gives black borders and 255 blue borders. But if you subsitute 0x000000 (black) or 0xff0000 (red) it results
in an error. Is there a simple way to obtain red borders ???
script:
#################################################################
# SmartResize by Donald Graft #
# #
# Values: #
# - letterbox [0,1] : 0 - without, 1 - with letterboxing #
# - mode [0, 1, 2 , 3, 4, 128, 129, 130, 131, 132] : #
# noninterlaced : 0 - nearest neighbor #
# 1 - bilinear #
# 2 - bicubic #
# 3 - precise bilinear #
# 4 - precise bicubic #
# interlaced : 128 - nearest neighbor #
# 129 - bilinear #
# 130 - bicubic #
# 131 - precise bilinear #
# 132 - precise bicubic #
# - color [0]: 0 - black by default (of bars when letterboxing) #
# - calculator : doesn't matter for now #
#################################################################
function VD_SmartResize(clip clip, int "new_width", int "new_height", int "letterbox", int "mode",
\ int "frame_width", int "frame_height", int "color", string "calculator")
{
LoadVirtualdubPlugin(VirtualDub_plugin_directory+"\Resize.vdf", "_VD_SmartResize")
return clip._VD_SmartResize(new_width, new_height, letterbox, mode, frame_width, frame_height, color, calculator)
}
The borders (when letterboxing) can be given any color. For example: black 0x000000, red 0xff0000 or blue 0x0000ff.
We have for example:
VD_SmartResize(320,240,1,4,320,320,0,"0 1 1 4 320 240 100 0 0 0 0 4 4 2 2")
The color argument 0 gives black borders and 255 blue borders. But if you subsitute 0x000000 (black) or 0xff0000 (red) it results
in an error. Is there a simple way to obtain red borders ???
script:
#################################################################
# SmartResize by Donald Graft #
# #
# Values: #
# - letterbox [0,1] : 0 - without, 1 - with letterboxing #
# - mode [0, 1, 2 , 3, 4, 128, 129, 130, 131, 132] : #
# noninterlaced : 0 - nearest neighbor #
# 1 - bilinear #
# 2 - bicubic #
# 3 - precise bilinear #
# 4 - precise bicubic #
# interlaced : 128 - nearest neighbor #
# 129 - bilinear #
# 130 - bicubic #
# 131 - precise bilinear #
# 132 - precise bicubic #
# - color [0]: 0 - black by default (of bars when letterboxing) #
# - calculator : doesn't matter for now #
#################################################################
function VD_SmartResize(clip clip, int "new_width", int "new_height", int "letterbox", int "mode",
\ int "frame_width", int "frame_height", int "color", string "calculator")
{
LoadVirtualdubPlugin(VirtualDub_plugin_directory+"\Resize.vdf", "_VD_SmartResize")
return clip._VD_SmartResize(new_width, new_height, letterbox, mode, frame_width, frame_height, color, calculator)
}