unsure about cropping

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
Locked
User avatar
Ryko89
Joined: Sat Nov 25, 2006 7:55 pm
Location: Norway
Org Profile

unsure about cropping

Post by Ryko89 » Sun Apr 27, 2008 5:59 am

I am wondering. when you crop, you it is one frame per number right?
I tried this:
crop(120,88,-120,-88)

But it didn't work as I wanted it to. so I was wondering. If you have 1280 x 720 and want it to be 848 x 480, what do you write then?

and btw, it seems that the http://www.animemusicvideos.org/guides/ ... tqual.html
is currently down
Image Image

Mosc
Joined: Mon Oct 30, 2006 8:13 am
Org Profile

Post by Mosc » Sun Apr 27, 2008 8:04 am

You're not making a lot of sense. Cropping has nothing to do with "a frame per number" and I have no idea what you could possibly mean by that. Also, saying "I tried this but it didn't work as I wanted it to" is completely useless without explaining how its results were different from you expected them to be.

If all you want to do is downscale the resolution, why not just invoke a simple resize command rather than to crop, which involves removing parts of the image? "Spline36Resize(848,480)" should suffice.

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Post by mirkosp » Sun Apr 27, 2008 9:24 am

Woah, the new eadfag is indeed down. :shock:
Anyway, by using crop, you cut a part of the image, so if you want to change the resolution of an image, I suggest you to use

Code: Select all

lanczos4resize(width,height)

User avatar
JaddziaDax
Crazy Cat Lady!
Joined: Tue Mar 16, 2004 6:25 am
Status: I live?
Location: Somewhere I think O.o
Contact:
Org Profile

Post by JaddziaDax » Sun Apr 27, 2008 11:30 am

cropping cuts off pixels..

User avatar
Ryko89
Joined: Sat Nov 25, 2006 7:55 pm
Location: Norway
Org Profile

Post by Ryko89 » Sun Apr 27, 2008 11:55 am

I am great with >=|
Well, yeah, I was basically if cropping cut of pixels. But all right, I'll try the
lanczos4resize(width,height) one =P

someday I promise to make sense...
Image Image

User avatar
Ryko89
Joined: Sat Nov 25, 2006 7:55 pm
Location: Norway
Org Profile

Post by Ryko89 » Sun Apr 27, 2008 12:01 pm

ah. Well, you have a script for setting the width and height of the footage, only it crops instead of resizes?
Image Image

Mosc
Joined: Mon Oct 30, 2006 8:13 am
Org Profile

Post by Mosc » Sun Apr 27, 2008 1:23 pm

It's possible to write a script for that, but it's trivial to calculate it yourself. Subtract your new width from your original width and divide that number by two. Let's name this number A. Now do the same for the height and call that one B. Your crop command should look like this: Crop(A,B,A,B), where you should obviously substitute the A and B with your calculated numbers.

Also, you really should use Spline36Resize instead of Lanczos4Resize. They're comparable in sharpness, but Spline36Resize produces less ringing.

User avatar
Ryko89
Joined: Sat Nov 25, 2006 7:55 pm
Location: Norway
Org Profile

Post by Ryko89 » Sun Apr 27, 2008 2:22 pm

Mosc wrote:It's possible to write a script for that, but it's trivial to calculate it yourself. Subtract your new width from your original width and divide that number by two. Let's name this number A. Now do the same for the height and call that one B. Your crop command should look like this: Crop(A,B,A,B), where you should obviously substitute the A and B with your calculated numbers.

Also, you really should use Spline36Resize instead of Lanczos4Resize. They're comparable in sharpness, but Spline36Resize produces less ringing.
I tried calculating, but then it ended up pretty thin and high, I'll try again. that's why I wondered if the crop works a different way than removing the pixels. Hmmm, maybe I did (a,a,b,b)
Image Image

Mosc
Joined: Mon Oct 30, 2006 8:13 am
Org Profile

Post by Mosc » Sun Apr 27, 2008 3:13 pm

Oh, my mistake, it should be: Crop(A,B,-A,-B).

Locked

Return to “AviSynth Help”