View Single Post
Old 30th July 2010, 18:06   #10  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by pandy View Post
Code:
nW=INT(fv.Width*(pasr*vasr))
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 )
Gavino is offline   Reply With Quote