# As before, uncomment one of the following lines of script at a time # then reopen the clip in VirtualDub (keyboard shortcut: F2) to see # the changes. # 1. Letterbox (add 160 pixels to height) and pillarbox (add 4 pixels to width) # Version().AddBorders(2,80,2,80,$000000) # 2. Letterbox as before, but instead of pillarboxing let's make the width # a multiple of 8 by cropping 4 pixels instead. # Version().AddBorders(0,80,0,80,$000000).Crop(2,0,-2,0) # 3. Preserve the complete picture by resizing # # Original resolution was 436x80, and we want to fill 440x240 pixels. To avoid # aspect distortions (which would make the picture look stretched in one dimension) # we want to scale the width and height by the same ratio. # # (New width / Old width) * Old height = New height # ( 440 / 436 ) * 80 = ~80.73 pixels # .. Let's round to the nearest whole number, 81 pixels # # So our resize is to 440x81 pixels. This leaves 240 - 81 = 159 pixels of letterboxing. # We'll add 79 pixels to the top and 80 pixels to the bottom to accomplish this. # # Let's use LanczosResize because it's a nice sharp resize filter. # (see http://avisynth.org/mediawiki/LanczosResize ) # Version().LanczosResize(440,81).AddBorders(0,79,0,80)