After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 596472 - Rotate brushes artifacts at certain rotation angles
Rotate brushes artifacts at certain rotation angles
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Tools
git master
Other All
: Normal normal
: 2.8
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2009-09-26 23:16 UTC by Tal
Modified: 2009-09-29 21:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Bugfix for rotate brushes artifacts at certain rotation angles (17.13 KB, patch)
2009-09-26 23:16 UTC, Tal
none Details | Review
Patch that fixes new artifact introduced by previous patch (1.80 KB, patch)
2009-09-29 20:47 UTC, Tal
none Details | Review

Description Tal 2009-09-26 23:16:24 UTC
Created attachment 144090 [details] [review]
Bugfix for rotate brushes artifacts at certain rotation angles

I found and solved a new bug in the bilinear interpolated transform algorithm
that sometimes caused artifacting on a brush edge for brushes rotated 90, -90,
-180, or 180 degrees.

The key to solving it was using non premultiplied x y coordinate values in the
if-tests for determining where an inverse-transformed pixel is located in
source-image space.

The bugfix patch is attached.
Comment 1 Tal 2009-09-27 15:00:55 UTC
I've just discovered that this patch introduces small artifacts when some brushes are scaled > 1 where sometimes a pixel appears one pixel north-west of the top left corner. Affected brushes seem to be those that have pixels all along the top edge or left edge pixels at y coordinates 1 or 2 (where 0 is the top row).

I will attempt to solve this, but if in the meantime someone else solves the problem, feel free to post a patch below.
Comment 2 Tal 2009-09-29 20:47:37 UTC
Created attachment 144294 [details] [review]
Patch that fixes new artifact introduced by previous patch
Comment 3 Sven Neumann 2009-09-29 21:05:20 UTC
I've merged the two patches and some white-space and formatting cleanup into a single commit and pushed it to the master branch. Thanks for your contribution.