Log in

View Full Version : Problem with resizers


AlPa
3rd August 2012, 16:28
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?

IanB
3rd August 2012, 23:43
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.

...
BilinearResize(2, 2)
Merge(FlipVertical()) # Average top and bottom
Merge(FlipHorizontal()) # Average left and right
Crop(0,0,1,1) # Grab top left pixel

jmac698
4th August 2012, 19:59
I had the same problem trying to extract small regions in my scripts. I usually just resize everything bigger, do a scaled resizing, and then do a final resize externally.