Quote:
Originally Posted by Gavino
This isn't right. It should be:
Code:
nW=round(vd.Width*(vasr/pasr))
Note also that this is only appropriate when vasr <= pasr, ie the photo is narrower than the video. When the photo is wider, you want to add borders on the top and bottom instead of the sides. (Left as an exercise for the reader )
|
Heh, Yes - You have absolutely right - i don't even try to complicate this script more - i assumed (maybe wrongly) that usually videos are 16:9 and pictures 4:3 (sometimes videos 4:3 and pictures also 4:3), also proper colorspace should be detected and maybe modulo calculation - anyway - good starting point for play with avisynth for newcomer.
regards!