Bug 468559

Summary: Wish: introduce a setting for smooth/non-smooth scaling of selections via mouse
Product: [Applications] kolourpaint Reporter: schreibemirhalt
Component: generalAssignee: kolourpaint-support
Status: REOPENED ---    
Severity: wishlist CC: martin
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: The same but I coloured the white background in red to make it more obvious. On the top is kolourpaint; on the bottom mspaint. In each case is the original rectangle on the left; resized right.

Description schreibemirhalt 2023-04-16 09:22:16 UTC
Created attachment 158141 [details]
The same but I coloured the white background in red to make it more obvious. On the top is kolourpaint; on the bottom mspaint. In each case is the original rectangle on the left; resized right.

SUMMARY
When resizing, there are unwanted pixels introduced that have in-between colors.

STEPS TO REPRODUCE
1. Create white canvas
2. Put rectangle with black outline on canvas
3. Switch to rectangular selection (S key)
4. Select rectangle
5. Resize rectangle

OBSERVED RESULT
Lines of gray pixels in #474747 and #a8a8a8 in between the black border and the white background

EXPECTED RESULT
No gray lines, just black and white pixels (like in mspaint)

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  Arch Linux / no Plasma running 
KDE Plasma Version: 5.27.3
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Comment 1 Martin Koller 2023-04-16 09:44:51 UTC
What you observe is the result of the smooth-scale algorithm, which in general makes scaled images less pixelated.

What you can do to avoid this, is using the Selection -> Resize/Scale menu action (CTRL-E)
and select "Act on Selection" and "Scale" instead of "Smooth Scale".
Comment 2 schreibemirhalt 2023-04-16 10:03:05 UTC
(In reply to Martin Koller from comment #1)
> What you can do to avoid this, is using the Selection -> Resize/Scale menu
> action (CTRL-E)
Ah! Yeah, I used this in the past but forgot this is a thing.
However, it would be nice if the behavior of  the rectangular selection tool (S) could be configured (especially since that smoothing happens even if Shift — to retain aspect-ration — is held down).
If I recall correctly, I was able to configure the behavior of one other tool that drew with such smooth pixels.
Comment 3 Martin Koller 2023-04-16 11:03:01 UTC
Smooth scaling has nothing to do with the aspect ratio. You will see a pixelated scaled selection especially when you use non-orthogonal lines, e.g. circles, etc.

So let's change this into a wish for a setting of smooth/non-smooth selection scaling then.