GNOME Bugzilla – Bug 344684
Greyscale (no alpha) clipboard brushes are of the wrong type.
Last modified: 2018-01-02 22:30:43 UTC
GRAY clipboard brushes draw like pixmap brushes instead of just being a mask for where to place FGcolor, like normal GRAY brushes are. Actually, GRAYA being interpreted literally doesn't make much sense to me either.. I thought the logical behaviour there would be to multiply the pixel data by the mask data and then consider the whole thing a mask. Hmm.
Actually this was intentional, so you can grab a piece of the image to draw with, just as with the clone tool. I don't see why it would work different for RGB and GRAY sources.
I thought 'paste to new brush' interpreted GRAY as a mask, but apparently not. (actually, it was the script-fu 'selection to.. brush' script that did this.. because it had knowledge whether the source image had an alpha channel or not.) Aaargh. I can see how the current behaviour could be useful, but personally it just gets in my way. I've drawn with clipbrushed pixmaps about 4 times vs 40 masked (using the trick of enabling pressure sensitivity to color and setting FG and BG to the same color) so far. What do you think of the idea of a 'Treat clipbrush as mask' toggle? Probably as an action that could be shortcutted.. I don't see anywhere such a thing could go in the menus. That could just swap two pointers' values (a field in the ClipBrush struct that begins as NULL(or whatever will indicate 'no pixmap data for this brush'), and the actual clipbrush's pixmap pointer.), could it?. I hope you agree, then I would code that, change the summary, and hope the patch gets committed by 2.4.
It would be nice if all brushes could be either used as pixmaps or masks. Until then, it is probably an easy solution to create both a pixmap clipboard brush and a mask clipboard brush when copying something.
That sounds like a pretty obvious solution, UI wise, and quick and easy to implement. Let's run it through the GUI dpt and think about it for 2.10.
Doing bug triaging for 2.10: this is oldest bug in milestone for 2.10 (at this moment only 56 are remaining) https://bugzilla.gnome.org/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&list_id=166021&order=changeddate%2Cbug_status%2Cpriority%2Cassigned_to%2Cbug_id&product=GIMP&query_based_on=&query_format=advanced&target_milestone=2.10 Could some core developer provide more info/update the general status of this bug?
Fixed in master: commit bcc3437f5f197d0ae4b359f44ba27199a7ac22d5 Author: Michael Natterer <mitch@gimp.org> Date: Wed Apr 19 17:33:44 2017 -0300 Bug 344684 - Greyscale (no alpha) clipboard brushes are of the wrong type Add a "mask-only" property to GimpBrushClipboard. When TRUE, only create a brush mask (not a pixmap brush with mask and image). Keep two clipboard brushes around: one classic "Clipboard Image" one to be used as "stamp", and one new "Clipboard Mask" one that turns the clipboard into a brush mask. app/core/gimp-data-factories.c | 29 ++++++----- app/core/gimpbrushclipboard.c | 103 +++++++++++++++++++++++++++++----------- app/core/gimpbrushclipboard.h | 4 +- app/core/gimppatternclipboard.c | 2 +- 4 files changed, 95 insertions(+), 43 deletions(-)
Created attachment 350904 [details] Shape of Clipboard Mask is different of original shape selection I have tested with rounded shape selections to create clipboard images to use as brush, but the 'Clipboard Mask' do not use the same shape. The original rounded shape becomes an square shape.
Sometimes, the mask obey the same shape, more-less, but is necessary repeat more times the copy...(as the first sample on the image) is a bit difficult understand the reason because is possible sometimes to have the same shape of the original selection. In my test, normally it is modified.
Created attachment 351389 [details] Comparison between different origins of clipboard masks in the three kind layers I have noted that the clipboard masks printed on white layers (with or withour alpha channel) are resulting more darken of my original copied. I have tested with 3 kind of clipboard masks: 1 - from white layer no alpha, 2 - from white layer with alpha, 3 - from transparent layer. I have applied each clipboard mask kind also in these three layer types, and resulting when the clipboard masks kind are applied on: # white layer no alpha - Change all - NOT OK (more darken) # white layer with alpha - Change all - NOT OK (more darken) # transparent layer are working nice.
(In reply to jose americo gobbo from comment #7) > Created attachment 350904 [details] > Shape of Clipboard Mask is different of original shape selection > > I have tested with rounded shape selections to create clipboard images to > use as brush, but the 'Clipboard Mask' do not use the same shape. The > original rounded shape becomes an square shape. In my tests when we use clipboard from transparent layers the shape is modified.
Created attachment 351791 [details] Schema to test the issue via .xcf file and a short movie showing the behavior of two clipboard options. I have made an schema in a xcf file to simplify the check of the clipboard options issues. A short screencast video, helps perhaps, understand how use the test and/or understand the problems with clipboard options. https://youtu.be/3aBZdrOcmdU
If you comment on a closed bug, you should reopen it if you think there is work to be done :)
The bug report is not my ... and I have verified and I don't have the privileges to modify the status ;)
Ok, reopening for checking the issue.
Created attachment 351833 [details] Test with clipboard image versus clipboard mask and issue around changes of the gray balance. I have made only to have the data how the clipboard is altering the gray balance of original stain used as pattern. Apparently the changes are not linear.
Created attachment 352323 [details] Shapes of Clipboard Mask with different methods to build them... The test was made using a circle selection of 100 pixels. 1) White layers (no matters if with or not alpha channel). When we have stains completely full, without some white zones on the borders, the clip mask becomes an square shape (Figure 1 and 2). 2) Transparent layers. All kind stains on transparent becomes always square shapes (fig. 3, 4 and 5).
Created attachment 352880 [details] Test with clipboard image versus clipboard mask and issue around changes of the gray balance. I have made another test, more understandable ;). Is a comparison of the dabs made with a simple .gbr with: # clipboard image dab; # clipboard mask dab; # brush dab (original). In the .xcf we have the dabs printed on Normal layers (legacy and default), for each case I have copied from respective blend set, or rather, the clipboard dabs are copied directly from each kind blend set (default clipboard dabs are copied from a Normal default blend). I did this, only to be sure if the clipboard origin caused this effect, seen that Legacy Normal blend has a different behavior of the default normal blend. The clipboard mask of both cases are identical, but is resulting more darker than of the original brush dab and of clipboard image dab.
I don't know what you expect here, I think we are talking about two entirely different problems. You can't just paint a dab with any brush, copy it from the image and expect the resulting clipboard brush to have exactly the same effect. It most often won't. The clipboard *image* brush simply paints with the clipboard buffer as if it were a colored gimp brush, no additional magic. The clipboard *mask* brush turns a grayscale version of the clipboard into a brush mask, and paints with whatever else is set on the used paint tool (color, whatever). Closing again as FIXED, I see no bug here.