Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 19th September 2012, 21:16   #1  |  Link
Soulvomit
Registered User
 
Join Date: May 2012
Posts: 27
Duplicating edges

How would I go about repeating the first row of pixels from any side of a video?
Soulvomit is offline   Reply With Quote
Old 19th September 2012, 21:55   #2  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,394
To the outside (making framesize bigger), or to the inside?

Repeating to the outside is very easy. It's also called "padding".
Code:
PointResize( width()+8, height()+8,  -4,-4, width()+8, height()+8 )  #  padding 4 pixels on every side

Reflecting to the inside is more tricky, and raises some "how do you want it to be" questions. It will be either some fiddling with crop() and StackHorizontal/Vertical, and/or involve some sort of masked-merging.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 20th September 2012, 00:51   #3  |  Link
mandarinka
Registered User
 
mandarinka's Avatar
 
Join Date: Jan 2007
Posts: 734
There are also filters like addborders() which adds black bars and fillmargins() which can fill them with the border lines/columns of the actual image.
mandarinka is offline   Reply With Quote
Old 21st October 2012, 11:15   #4  |  Link
Soulvomit
Registered User
 
Join Date: May 2012
Posts: 27
Thanks a lot, Didée and mandarinka. Yeah, I was referring to making the frame bigger. Using PointResize, is it possible to choose which side I want to work with or is padding every one of them and cropping thereafter inevitable?
Soulvomit is offline   Reply With Quote
Old 21st October 2012, 11:35   #5  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,394
Code:
function Padding(clip c, int left, int top, int right, int bottom)
{
w = c.width()
h = c.height()
c.pointresize( w+left+right, h+top+bottom, -left, -top, w+left+right, h+top+bottom )
}
Padding only the right border, by 8 pixels:

yourclip.Padding(0,0,8,0)
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 21st October 2012, 11:47   #6  |  Link
Soulvomit
Registered User
 
Join Date: May 2012
Posts: 27
Many thanks.
Soulvomit is offline   Reply With Quote
Old 11th March 2018, 19:23   #7  |  Link
color
Registered User
 
color's Avatar
 
Join Date: May 2016
Posts: 128
Thank you for the script Didée, I know this is an old post but it helped me with some problems I had.
__________________
Automatic Colorization
color is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:18.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.