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. |
3rd August 2012, 16:28 | #1 | Link |
Registered User
Join Date: Jul 2012
Posts: 1
|
Problem with resizers
Hi!
I'm trying to apply resizers from avisynth in my program, which should generate mipmaps, but I have a problem: I tried all the 11 internal resizers, and some external plugins, but all of them accept output width and height only up to 8 pixels or so. Does any plugin exist which can resize up to 1x1? |
3rd August 2012, 23:43 | #2 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
A resize to 1x1 would be an average of the whole image.
BilinearResize() can resize to 2x2 for RGB, Y8 and YV24 images. You could then do a last step of combining the 4 pixels with flips and merge, then crop a single pixel. Code:
... BilinearResize(2, 2) Merge(FlipVertical()) # Average top and bottom Merge(FlipHorizontal()) # Average left and right Crop(0,0,1,1) # Grab top left pixel |
|
|