Krita transform tool produces aliased edges

:open_mouth:
Wow thanks for explanation!
It’s more clear to me now about why there’s a second process 3second after first rendering

I saw there was a shift but sincerely I was not able to understand from where it came (and trying to hard code +1px to check if it fix the problem, didn’t change anything :sweat_smile:)

:star_struck:
Aah thanks!
I’ll take a look on it this week-end, I’m really curious to understand how it works.

This comforts me not being able to understand what’s happens here :sweat_smile:

Anyway, many thanks for explanation and MR!
In addition, I’m curious to now if there’s a reason why first (fast) render use workers to parallelize process, and not the second (high quality) one :innocent:

Grum999

2 Likes

Both are asynchronous, so that the ui does not get blocked. But to get to the worker setup code for the high quality one you have to follow some function calls.

Don’t ask me details because i spent the morning getting Dmitry to explain the code and i still am confused :cold_sweat:

1 Like

:thinking:
On my side, for what I see on big 16000x16000px image (and also from traces I’ve put when I tried to understand the situation)

  • The first (fast) transform use workers to parallelize render from tiles (512x512 it seems)
    – It’s fast
    – UI is not blocked
    – We can see tiles being updated during process


    Example: rendering tiles is parallelized, UI is not blocked (can switch tab in docker for example)

  • The second (HQ) transform seems to not be parallelized
    – It’s slower than fats method (even using same bilinear algorithm)
    – UI is blocked
    – Transformed render is updated in one-shot after complete transform


    Example: rendering tiles is not parallelized, UI is blocked (can’t switch tab in docker for example)
    First we see here the bilinear being applied, can switch between tabs
    *Then, we see the progress bar in docker: HQ in on progress, can’t switch between tabs in UI and at the end, when all tiles are processed we see the HQ updated (used a nearest-neighbor here to see the difference)

Don’t worry, it was in case you had the answer :sweat_smile:
I spent most of my last saturday and part of sunday on it, without understanding it… :woozy_face:
You understand the situation here better than me so I know what is the feeling to be confused about how this work :sweat_smile:

Let’s wait for Dmitry feedback about this :slight_smile:

And the most important is the ability to fix the aliasing stuff, the parallelization is another subject I think.

Grum999

Here’s what I get with commit 5ae24a56. The edge is no longer aliased, but the image still jumps 1px to the left. (That is, the temp preview is 1px to the right of the final render.)

1 Like

That was already a bug before this commit.

I know, I was just demonstrating which issue was fixed and which was still there.

@freyalupen and @Grum999 see if you can put your findings on the mr, so that Dmitry sees them.

Yes, the fix was separated in 2 parts, 1 the aliasing artifact which was fixed and the other part is related to sampling.

@freyalupen the issue you talk about I didn’t find by rotating/scaling. It may be that it only happens with some combinations of those and maybe also translation. I’m not sure if it could be just rect computation related or if the sampling issue is involved. Just write in the mr please. And maybe share the file.

3 Likes