View Full Version : neuron2 - req for smart resize
FredThompson
11th December 2006, 00:28
Donald,
Would you add the ability to specify the border sizes when letterboxing to your smart resize filter? Currently, it automagically centers the source but that's not always the desired result.
Guest
11th December 2006, 00:54
Workaround: Make the borders centered and then crop off the extra bits you don't need.
FredThompson
11th December 2006, 04:37
This comes from a few months of using your logo filter to set static elements (a frame and text) over a video source. The challenge arises when the "holes" in the logo aren't centered.
This image should help explain.
Your suggestion will work but try it a hundred times or so and you'll see what I mean.
Hmmm...thinking about it now, what I'm doing is fudging an overlay with your logo filter...
Guest
11th December 2006, 05:43
I don't recognize that image. It's nothing I made.
FredThompson
11th December 2006, 16:29
Oops, sorry about that. I edited the post and removed too much. That dialog is from an old version of Paint Shop Pro. It's a similar function to your letterboxing. The default is to center but you can turn that off for either (or both) X and Y and specify an absolute size for the added border on one side with the opposite side automatically being adjusted to yield the absolute size.
I shouldn't try to post when I'm tired...
FredThompson
12th December 2006, 02:07
This shows what I have in mind. The original is a real-time screen capture. However, what happens when one of the "embedded" videos is updated or needs to be edited?
I've been doing this by making a logo bitmap from the rest of the image with the video portion being transparent. The new video segment is resized and borders added then the logo dropped on top. The result is spliced into the previous capture.
Using the logo filter in this manner makes it easy to accommodate changes in the length of the video clip. Perfect positioning isn't so easy.
Guest
12th December 2006, 02:13
Fred, I've no idea what you are talking about. You started out talking about my smart resize filter and now you're talking about my logo filter.
Your picture above shows a simple, symmetrical black border. What's the big deal?
Can you slow down and start all over, and explain everything again please? Start with a clear explanation of what you are trying to achieve. If you want to take it to PM, that's OK with me.
FredThompson
12th December 2006, 06:00
Yes, of course. Sorry, this is the danger of trying to explain something which has become second nature, isn't it?
In this case, the desired result is 800x600 pixels. (This particular original is a screen recording of a PowerPoint original. That's not critical but does explain how the "overlay" was originally achieved.)
Imagine the second image is a bitmap used with your logo filter. The "photo" portion would actually be the invisible color, typically a solid blue region.
Resizing a video to the dimensions of the bluescreen region can be done using your Smart Resize filter.
The challenge is how to easily position this result to match the logo overlay. The final size would be 800x600 but the margins are not equidistant. The dialog from Paint Shop Pro shows a way to have centering as the default but the user can specify one border and the opposite border is automatically adjusted to yield the final result.
In this specific case, the "embedded" video is sized at 535x401 pixels (I know, I know, this is the result of resizing inside PowerPoint.)
What I'm suggesting is smart resize be used only to add borders. The frame width would be 800, the height would be 600. The new fields would be set as left 248, top 72 and the filter would calculate the right and bottom borders to bring the result to 800x600.
In use, the VirtualDub filter chain would start with your Smart Resize filter and apply letterboxing with the aforementioned non-symetrical borders. The second filter is the logo filter which applies the static elements on top of the letterboxed video. (alpha blending at 255.)
Guest
12th December 2006, 06:19
OK, gotcha. Lemme think about it.
Guest
13th December 2006, 02:19
Would you accept an Avisynth solution?
FredThompson
13th December 2006, 05:00
Well, I can create that myself. I'm not wanting to ask for something which would b e difficult for you. Basically, I realized there isn't a good VirtualDub overlay option. At least, not one that I know of.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.