Jump to content
You must now use your email address to sign in [click for more info] ×

Bilinear scaling is poor quality on Windows


Recommended Posts

First, I want to complement you on a great product. I just bought Photo from the Microsoft Store as a possible replacement for Adobe Photoshop and am considering buying Designer as well to replace Illustrator.

 

My first impression of the software was horrifying though. As soon as I started drawing on a newly created document, I was wondering what was wrong with the pen. No matter what setting I used on the pen or even when drawing shapes, the edges were horrifying at best.

 

I have done some Google searches and seen posts such as :

This one

and 

This one

 

As well as quite a few others. 

 

I also see comments dating back to 2016 stating "We'll fix this when we get around it" for example.

 

This is because you're employing bilinear interpolation or nearest neighbor for scaling. This is not a good solution for your product and makes the software feel very unpolished.

 

Bilinear scaling for bitmap graphics inside of a paint program, especially one which is GPU accelerated is not a good solution under any circumstance. Bilinear makes use of only the 4 neighboring pixels to calculated the new pixel values for the position. And the new position is little more than an averaging calculation which completely disregards the frequency plane of the image as it's not possible to operate in frequency space with such limited input data.

 

Generally, the algorithm is mediocre at best, and it is famous for causing banding as well as other serious artifacts while scaling. The serious problems with your software is related to the famous interpolation related staircasing effects. The algorithm is absolutely terrifying when operating on anything resembling line art. 

 

A slightly better solution of course is to employ bicubic scaling which is almost equally simple to implement, but produces substantially better results with little development cost. As a point of reference, I implemented this algorithm when I was 13 years old in the 1980's with nothing more than a book and a scanned photo to work with. It is very simple to implement and would probably get most people to leave you alone about it.

 

As a far better solution, you should seriously consider non-averaging solutions and instead focus on frequency domain solutions such as either a Fourier solution or preferably an edge-directed interpolation solution.

 

EDI is your best option, even where performance and quality is concerned. The algorithmic complexity is low and can be easily implemented as a GLSL or HLSL shader. See Github for some implementation of Directional Cubic Convolution Interpolation.

 

Please spend an hour implementing bicubic and then spend a little more time implementing DCCI or similar. If you were to make an interpolation API for scaling, I'd consider implementing these.

Link to comment
Share on other sites

It's not as simple as it looks, though. I recall that the Krita developers mentioned similar canvas anti-aliasing issues, and a lot of time was spent to arrive at the result they wanted. Looks great now, but it took them a lot of programming effort to get there.

PS ClipStudio has brilliant on-screen canvas anti-aliasing. Even thin pencil lines are rendered beautifully zoomed out.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.