Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Generating the factors dynamically isn't that hard. I implemented this algorithm back in the late 80's, and it had acceptable performance on a 25 MHz processor. Not only that but it had to do some distortion correction at the same time, so it was applying a different resize factor to every single line of the image. All with integer math.


Oh absolutely, I believe it, and I looked at @pedrocr's code. Very simple. But, a static box filter is even simpler.

Did you call it pixel mixing in the 80s? I've been doing image resizing for decades and never heard the term before tonight. I have implemented a couple of very similar algorithms to pixel mixing for CG films, once in a shader and once for antialiasing in a particle renderer.


>Did you call it pixel mixing in the 80s? I've been doing image resizing for decades and never heard the term before tonight.

I hadn't either. I just searched for a name for the algorithm I also came up with independently. The imagemagick docs had a particularly comprehensive discussion on resizing options and linked this page with this naming for the algorithm.


I didn't have a name for it back then. I developed it independently so there was no existing reference for the name.

I worked on a major application years later that was calling it bilinear, until someone pointed out that bilinear had a completely different definition. I think we renamed it Weighted Average.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: