Log in

View Full Version : don't understand avisynth crop


vivaatloni
24th July 2002, 17:42
Hello,

I have captured my video8 movie and want to make it a svcd with dvd2svcd. This goes great but I want to crop also. I searched the forum but I can't seam to find out how the crop works. From the site http://math.berkeley.edu/~benrg/avisynth-reference.html it is also unclear. I want to crop at the left 6, at right 14, at top 0 and at the bottom 10 from the original movie 720x576.
The site says this Crop(left,top,width,height). So I can only crop left and top. How does this work??? (I don't want to resize cause I do this with bicubicresize later.)

greetz Vivaatloni

pacohaas
24th July 2002, 18:50
Crop(left,top,new width, new height)

new width=(orig width)-(left crop)-(right crop)
same with new height

vivaatloni
24th July 2002, 18:54
ok cool.

Thx for taking the time for explaining it.

pacohaas
9th August 2002, 19:26
this might be only for the new AVISynth, but it's worth mentioning:If a negative value is entered in the width and height these are also treated as offsets. For example:
#Crop 16 pixels all the way around the picture, regardless of image size:
Crop(16,16,-16,-16)So in your case, I think you could just do:
#Crop(left,top,-right,-bottom)
Crop(6,0,-14,-10)

Much easier than calculating the width and height every time you want to just crop a few pixels off the edges.