Commit 3dfad538 authored by Agata Cacko's avatar Agata Cacko

Fix NN algorithm for certain percentages

Before this commit, some percentages of scale would result
in the content disappearing after using Transform Tool.
Adding more support to the filter strategy in this commit
ensures that the correct pixel is added to the pool of possible
pixels for NN algorithm.

BUG:408182
parent e25be8ab
......@@ -95,7 +95,9 @@ class KRITAIMAGE_EXPORT KisBoxFilterStrategy : public KisFilterStrategy
{
public:
KisBoxFilterStrategy() : KisFilterStrategy(KoID("NearestNeighbor", i18n("Nearest Neighbor"))) {
supportVal = 0.5; intSupportVal = 128;
// 0.5 and 128, but with a bit of margin to ensure the correct pixel will be used
// even in case of calculation errors
supportVal = 0.51; intSupportVal = 129;
}
~KisBoxFilterStrategy() override {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment