Followers 0

# 2D Image Scaling Algorithms

## 63 posts in this topic

50 posts in this thread. I understand that this plugin is still in development, but when are you planning to release it to the general public?

0

0

##### Share on other sites

OK could you tell me which weights you use for blending ?

formula is

c=(a*n+b*m)/(n+m)

Just need to know the values n and m for each blend case to fix that.

Your code was optimized so I thought these were yours (could you pls confirm?):

32W 7:1

64W 3:1

128W 1:1

192W 1:3

224W 1:7

Those proportions are right. I can confirm this.

0

##### Share on other sites

This is the plugin Developers section of the forum. Many users will not be aware that this plugin is available.

Reposting the plugin in the Plugins forum with a description of what it does and a how-to guide to usage (screenshots!) would make all the users aware of it.

0

##### Share on other sites

OK we'll do that when we got this XBr working as expected.

Hyllian, I tracked your 3x differencies back in code, thanks for the standalone version. Without it I wouldn't been able to find the differencies. It's like I assumed earlier: You changed your filter code over time so this is the difference in 3x FILTRO:

```
#if ORIGINAL_IMPL
if ((e < i) && (!_IsEqual(pf, pb) && !_IsEqual(ph, pd) || _IsEqual(pe, pi) && (!_IsEqual(pf, i4) && !_IsEqual(ph, i5)) || _IsEqual(pe, pg) || _IsEqual(pe, pc))) {
#else
if ((e < i) && (!_IsEqual(pf, pb) && !_IsEqual(pf, pc) || !_IsEqual(ph, pd) && !_IsEqual(ph, pg) || _IsEqual(pe, pi) && (!_IsEqual(pf, f4) && !_IsEqual(pf, i4) || !_IsEqual(ph, h5) && !_IsEqual(ph, i5)) || _IsEqual(pe, pg) || _IsEqual(pe, pc))) {
#endif```

The Part in the ORIGINAL_IMPL is the one from your standalone, the one below is the one from your original C-sources. I'll now continue on the 4x and 2x differencies. Can you tell me which of all your 2x'es you used ?

Edit: 4x is also solved, you used 4x v2 which is slightly different.

Edit: 2x is solved, you used 2x v5.

I'll release the current version.

Edited by Hawkynt
0

##### Share on other sites

OK we'll do that when we got this XBr working as expected.

Hyllian, I tracked your 3x differencies back in code, thanks for the standalone version. Without it I wouldn't been able to find the differencies. It's like I assumed earlier: You changed your filter code over time so this is the difference in 3x FILTRO:

```
#if ORIGINAL_IMPL
if ((e < i) && (!_IsEqual(pf, pb) && !_IsEqual(ph, pd) || _IsEqual(pe, pi) && (!_IsEqual(pf, i4) && !_IsEqual(ph, i5)) || _IsEqual(pe, pg) || _IsEqual(pe, pc))) {
#else
if ((e < i) && (!_IsEqual(pf, pb) && !_IsEqual(pf, pc) || !_IsEqual(ph, pd) && !_IsEqual(ph, pg) || _IsEqual(pe, pi) && (!_IsEqual(pf, f4) && !_IsEqual(pf, i4) || !_IsEqual(ph, h5) && !_IsEqual(ph, i5)) || _IsEqual(pe, pg) || _IsEqual(pe, pc))) {
#endif```

The Part in the ORIGINAL_IMPL is the one from your standalone, the one below is the one from your original C-sources. I'll now continue on the 4x and 2x differencies. Can you tell me which of all your 2x'es you used ?

Edit: 4x is also solved, you used 4x v2 which is slightly different.

Edit: 2x is solved, you used 2x v5.

I'll release the current version.

Yes, great job!

That old "if" is my implementation for sharp 90 degree edges, similar to yours. The new version is a bit soft in that restriction, so that only some sharp edges are left intact. I like the new way more because it doesn't cause those nasty artifacts I pointed earlier. You could use the three ways (rounded, sharp and sharpest) in your software.

Edited by Hyllian
0

##### Share on other sites

deleted

Edited by aliaspider
0

##### Share on other sites

My gimp plugin for scaling algorithms: https://www.dropbox.com/s/2gmgp2tair3r2wa/scale2x.py?dl=0

The xBR implementations are no-blend.

Image you should use:

Note: xBR implementations have the difference functions replaced by equality. One part of xBR picks a pixel with least difference from original (which is used in the enlarged pixel) and I couldn't reproduce it. I added edge detection to fix it. The modified version of xBR 3x rounds the tips of 1-thick lines and single pixels. xBR 2x only interpolates bottom 45° triangles for a full pixel in the enlarged pixel. This makes the 45° lines and triangles look good, but slightly biased upward. The alternative version interpolates 45° triangles for a full pixel if no other corner has a triangle. This makes the images similar to Scale2x (good 1-thick lines only). Still better than your version which has no good 45° shapes.

Edited by Piotr
0

##### Share on other sites

Piotr, that does nothing to help paint.net users. Post on-topic or I'll ban you for spamming.

0

##### Share on other sites

@BoltBait! WIN10 Defender prevents me from downloading this link for the paint.net plugin. It allowed me to download the standalone executable just fine. The app is now a standalone exe. that has nothing to do with paint. Tested and it works fine. Closing this thread and removing the link might be a good idea.

0

##### Share on other sites
41 minutes ago, AndrewDavid said:

Well, that's an old version anyways. Get the newest one (r133) from here:

0

##### Share on other sites

Thanks @toe_head2001. Guess I should read more closely to EERs notes.  Now lets see if its of any use.

0

##### Share on other sites

Much better upscaling algorithms out there, if you ask me. But, draw your own conclusions.....

0