GNOME Bugzilla – Bug 499157
Alpha to Logo Scripts resize the image
Last modified: 2018-05-24 12:16:34 UTC
Please describe the problem: Two issues, really: When text is modified using any of the Alpha to Logo functions, the function moves the text to the center of the image (this is the first issue -- don't think that this is supposed to happen), creates the proper layers, for example, a glow and background layer of the same size as the text layer for the "Alien Glow" function, and then crops all the other layers to the size of the text layer, regardless of whether they are above or below the text layer. One or two, such as the "3D Outline" function, deletes the background layer entirely. Steps to reproduce: 1. Open any picture as an image. 2. Create a text layer above it. 3. Select the text layer and go to Filters->Alpha to Logo->Alien Glow (or any other filter on the Alpha to Logo list). 4. Accept defaults in the function box and press the "OK" button. Actual results: Exactly as described in the problem box above. Expected results: I would have expected that the function be applied to the text layer wherever the text layer was rather than (as it is now) moving it to the center. The functions work with the appropriate background and modification layer(s) being applied directly under it, but I would not expect that all other layers would be cropped to the same size and place, or worse, deleted. Does this happen every time? Yes. Other information: I'm running a Windows x64 XP Pro dual P with 3G ram. I regard this as "Minor" because the workaround is obvious: Create a duplicate image, use the Alpha to Logo function in the duplicate, then drag the new layers over to the original image. They snap right into place in the center and can be easily linked and moved from there.
There is a related report, bug #498480. And IIRC we do have one for the cropping, too, but I can't find it.
I guess this report should be merged with bug #498480 but I am leaving that up to Kevin.
Marked bug 498840 as dependant on this bug.
*** Bug 594683 has been marked as a duplicate of this bug. ***
Is it really *cropping* the layers? To me it simply looks as if all the scripts call a utility function that resizes the image but does *nothing* to the layers. Not that this behavior would be correct in any way...
Yes, the existing layers are kept intact, the canvas is resized.
Changing summary accordingly.
Are we interested in resizing the image so the entire logo would be revelaed (see comment below)? Or do we prefer that the image won't be resized at all? Most of the logo scripts use the script-fu-util-image-resize-from-layer function, which does the resizing which we don't want. I implemented a function called script-fu-util-image-resize-to-include-layer, which resizes the image to include the layer, while making sure the canvas isn't being shrunk and that areas that were inside the canvas will remain inside even after the execution. This function can be used in our case to do a proper image resizing if we wish to allow it. The second option, in order to prevent complicating all the scripts that already work (by adding resize calculations), is to write a function called script-fu-util-image-resize-from-layer2 which will return a value that when given to the function script-fu-util-image-restore-size (which we will also write) will restore the canvas to it's original dimensions and position. Which option sounds better? We should remember that there are filters/scripts that resize the image (such as the tile filter) and that it may be right to allow the resizing.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/257.