VideoHelp Forum

+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. An Avisynth cropping preview function.

    CropPreview 2022-01-30.zip

    This is a cropping preview function based on the previews from the CropResize script, and I thought I'd upload it for anyone who's interested. Sometimes it's easier to look at what you're cropping before actually cropping it.

    It's very simple to use, although there is a help file. When using Avisynth's Crop() function, you can use pCrop() for a cropping preview (naturally when you adjust the cropping you need to refresh the preview), and when you're happy, remove the "p" from the beginning of the function name to crop.

    There's three cropping previews, and the other two are enabled by adding more "p"s.
    Obviously this image doesn't really need cropping, but to demonstrate...

    pCrop shows the cropping preview as yellow lines.

    pCrop(18,20,-26,-36)




    ppCrop shows the cropping preview as yellow transparent borders.

    ppCrop(18,20,-26,-36)




    And pppCrop shows the cropping preview as the inverse of the picture, much like AvsPmod's preview.

    pppCrop(18,20,-26,-36)




    Naturally when you're happy, you just remove the "p"s to crop.

    Crop(18,20,-26,-36)




    Because sometimes it's handy, there's also wrapper functions for displaying the current frame number and/or time over the video. The help file has details, but they work by appending letters to the other side of the function name, and can be used with or without a cropping preview enabled.

    CropP(18,20,-26,-36)

    Last edited by hello_hello; 29th Jan 2022 at 15:33.
    Quote Quote  
  2. I'm glad you'll have a use for it!
    Quote Quote  
  3. New version dated 2022-01-29 in the opening post. Functionality hasn't changed. Just cleaned up the syntax and adjusted the text display a little.
    Last edited by hello_hello; 29th Jan 2022 at 01:55.
    Quote Quote  
  4. And a quick update to change the cropping to unnamed arguments to match the Crop function as it makes more sense.
    Also changed the default behaviour of the CropF, CropT and CropP functions so they apply the cropping. New version dated 2022-01-30.
    Quote Quote  



Similar Threads