Photoshop: Add more resample/interpolation algorithms

  • 3
  • Idea
  • Updated 4 months ago
  • (Edited)
It would be nice, in addition to bicubic, bicubic, and more bicubic, to also be able to choose from some of the other algorithms out there like Lanczos. Also, I heard on a forum somewhere that Lightroom has a better bicubic method than Photoshop that is a blended version. If that's true, it'd be nice if those of us with the much more expensive Creative Suite instead of Lightroom could get in on that as well.
Photo of David Petrofsky

David Petrofsky

  • 4 Posts
  • 0 Reply Likes

Posted 7 years ago

  • 3
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 765 Reply Likes
Lightroom uses code similar to Photoshop's bicubic smoother and bicubic sharper.

Do you have specific requests that are known to perform well for images?

Lanczos works well in some instances, but has disturbing artifacts when applied to images. (we tried it during a beta test, it was rejected as one of the worst performing interpolation kernels).
Photo of Royi

Royi

  • 28 Posts
  • 5 Reply Likes
Maybe something which isn't based on Convolution (Bilateral Interpolation)?
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 765 Reply Likes
How about the "preserve details" upsampling method?
Photo of Jayant Singh

Jayant Singh

  • 1 Post
  • 0 Reply Likes
which algo do preserve details uses?
Photo of David Petrofsky

David Petrofsky

  • 4 Posts
  • 0 Reply Likes
Interesting. I just like to have various options to try for a given image to see which one looks best and had heard good things about some of the algorithms that I didn't want to spend $200 per plug-in on, like Lanczos, s-spline, fractals, etc. I've also seen very good results in how Smugmug generates multiple sizes per image (all downsamples from the original), and they say they use Lanczos. Even if bicubic is the safe one for the most images, having a couple of options that might work better for some images could be useful. Do the bad artifacts in Lanczos occur on downsampling too or just upsampling?
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 765 Reply Likes
Lanczos artifacts occur with any respampling, but are more visible when upsampling. For thubmnails they may be difficult to spot.

And we tested 6 different kernels, and kept the best of them. (which gave you sharper and smoother)

We try not to add too many options just for the sake of adding options. We try to have good reasons for the options and make sure that they give good results. There are many kernels out there that give worse results than what we already have.

S-spline, level sets, "geniuine fractals", etc. fall into a very different category for resampling, and we are investigating better methods similar to those.
Photo of Royi

Royi

  • 28 Posts
  • 5 Reply Likes
Sounds interesting!
We'd be happy to see some results.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 765 Reply Likes
See the "preserve details" upsampling method.
Photo of David Petrofsky

David Petrofsky

  • 4 Posts
  • 0 Reply Likes
Fair enough.
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 13977 Posts
  • 1664 Reply Likes
We did add an option called "Bicubic Automatic" which selects the preferred interpolation scaling up or down.
Photo of Chris Moeller

Chris Moeller

  • 1 Post
  • 0 Reply Likes
Windowed sinc resampling is signficantly better at shrinking images than bicubic filtering, although Lanczos is not the best kernel window choice. Perhaps some Nuttall 3 term? That works nicely for audio resampling, at least.

The best part about windowed sinc resampling is that a sinc window and kernel may be computed to fit the exact ratio of the resizing job, from upsampling to downsampling.

Although, technically, a fractal algorithm similar to Genuine Fractals is much better at upsampling than most general purpose interpolation filters.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 765 Reply Likes
Unfortunately, again, windowed sync typically shows visible artifacts in images - unless the window is so small that you match the bicubic kernels.
Bicubic kernels can also be scaled for the exact ratio needed (and are in Photoshop).

The "fractal" algorithms work by faking (hallucinating) texture and details that don't exist in the original image - which sometimes works, and sometimes leads to really bad artifacts. Plus, Photoshop already has an image self similarity upsampling method ("preserve details", designed not to create so many artifacts).