Log in

View Full Version : Simple Pixel Doubling?


Corpsecreate
22nd December 2011, 13:17
I have a 640 x 480 clip and I would like to directly duplicate the resolution to 1280 x 960 by duplicating each pixel. I imagine this would cause no artifacts and would be a very fast resize. Is there a resizer that can accomplish this? Also is there a way to halve the resolution by removing every 2nd pixel (ie go backwards from the upscale)?

Any help is appreciated ;D

sneaker_ger
22nd December 2011, 13:27
PointResize() ?

TheFluff
22nd December 2011, 13:33
Doubling the resolution in both directions is pixel quadrupling, but yes, pointresize() will do that. For the other direction you can use either pointresize() again or reduceby2().

Corpsecreate
22nd December 2011, 13:37
Thank you very much for the help. I did a quick test by subtracting the pointresized image from the original and I get a complete grey image as expected. When I used reduceby2() to go backwards I got a slightly blurrier picture with edges showing up on the subtracted image. Thanks for the help guys!!

Edit: Another quick question if I may. When it comes to Spline36 vs Lanczos4, which is faster to process? I wont ask which one looks 'best' because thats subjective but one should be faster than the other.

Gavino
22nd December 2011, 15:23
When I used reduceby2() to go backwards I got a slightly blurrier picture with edges showing up on the subtracted image.
Yes, ReduceBy2() does anti-aliasing and blurs the image -it's similar to BilinearResize in effect.
Using PointResize will losslessly restore the original image.

When it comes to Spline36 vs Lanczos4, which is faster to process? I wont ask which one looks 'best' because thats subjective but one should be faster than the other.
Spline36 is faster as it processes fewer pixels (equivalent to Lanczos(taps=3)).
Lanczos4 is the same speed as Spline64.