RSS/Atom feed Twitter
Site is read-only, email is disabled

Rectangle selection tool - fixes and more

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

Rectangle selection tool - fixes and more Samuel Rats 12 May 09:42
  Rectangle selection tool - fixes and more Simon Budig 12 May 13:33
Samuel Rats
2018-05-12 09:42:06 UTC (almost 6 years ago)

Rectangle selection tool - fixes and more

Hi everyone!

First of all, I wanted to thank you all for this amazing product that is GIMP.
I'm using it for ages now, and I did not find better so far. And I'm not just talking about features, but also about code quality. Big thank you to everyone involved in this project.

I recently updated to to 2.10, and unfortunately, the 2 bugs bothering me were still there. So, I decided to have a look at it. The 2 bugs are impacting the rectangle selection tool. Also, they tend to be reproduced way easier on Windows than Linux (I don't do Mac, sorry).

First bug is a rounding issues when using a fixed-proportion selection. It can be reproduced by selecting a zone of an image, moving the selection, and resizing it.
Sometimes, due to half-pixel position of the upper-left corner of the selection, you end-up with a inconsistency between the expect proportion and actual selection size.
1000*1000 -> 1260*1261, for instance. I couldn't find anything about a similar issue in the bug tracker.

The second bug is a bit more annoying. Sometimes, when manually changing the dimensions of a selection zone, GIMP become unresponsive. Windows then kindly ask to kill it. I was only able to reproduce this issue on Windows.
The behavior kind of match the description of this issue https://bugzilla.gnome.org/show_bug.cgi?id=779040. For what I understood of the way it's implemented, it can be also due to rounding positions/size, and the notify feature of gobject. Value changed -> do some work (because rounding) -> notify value change (because rounding) -> repeat.

I noticed a TODO in the code of the rectangle selection tool, about changing the internal representation of the selection zone from gdouble ((x1, y1), (x2, y2)) to gint (x1, y1) + width & height. So, that's basically what I did. Since then, I'm not able to reproduce either of the bugs.

I couldn't find information on the gimp wiki on how to send a patch for review, so I'm asking here: what should I do with it? Should I send it here, by email? Should I push a branch somewhere? Something else?

Samuel Rats
Simon Budig
2018-05-12 13:33:49 UTC (almost 6 years ago)

Rectangle selection tool - fixes and more

Hi Samuel.

Samuel Rats (samuel.rats@gmail.com) wrote:

I noticed a TODO in the code of the rectangle selection tool, about changing the internal representation of the selection zone from gdouble ((x1, y1), (x2, y2)) to gint (x1, y1) + width & height. So, that's basically what I did. Since then, I'm not able to reproduce either of the bugs.

Thanks for investigating this issue!

I couldn't find information on the gimp wiki on how to send a patch for review, so I'm asking here: what should I do with it? Should I send it here, by email? Should I push a branch somewhere? Something else?

Basically the best method is, to attach the patch to a bug report, either open a new bug or reuse the one you mention.

Also please feel free to pester us on IRC (#gimp on irc.gimp.org) about this issue... :-)

Thanks,
Simon

simon@budig.de              http://simon.budig.de/