Posts: 1,039
Threads: 86
Joined: Aug 2018
Reputation:
83
Operating system(s):
- Windows (Vista and later)
Gimp version: 2.10
07-19-2024, 02:05 AM
(This post was last modified: 07-19-2024, 02:06 AM by Krikor.)
Hello All!
Could someone explain to me if what I'm getting is the way the Wavelet-decompose filter should behave?
01- I downloaded an image - https://wallpapercave.com/wp/wp12859845.jpg ;
02- I added an alpha channel to the image layer;
03- I duplicated the layer;
04- Using the Paths tool I traced an outline on part of the image of this new layer;
05- I did Path to selection, inverted the selection and deleted it;
So far, no news, a common sequence.
Then on the layer with the cutout and transparent background I applied the Wavelet-decompose filter ( Filters-Enhance-Wavelet-decompose), default settings.
The issue is that the filter, instead of applying the effect only to the visible and cropped part of the layer (the rhino head), applied the effect as if the crop had not been made and the background had been extracted.
I don't know if I managed to explain the situation well, so I recorded a short 48-second video trying to show what is happening.
https://i.imgur.com/q2bB4hi.mp4
Next, I created a new image using just the rhino head layer, without the original image layer at the bottom of the layer stack.
I applied the Wavelet-decompose filter and again it resurfaced the original background that I had removed.
Am I just confused or is there something strange about this?
Thx!
.....
Samj Portable - Gimp 2.10.28 - Win-10 /64.
Posts: 1,500
Threads: 68
Joined: May 2021
Reputation:
167
Operating system(s):
Gimp version: 2.10
07-19-2024, 03:28 AM
(This post was last modified: 07-19-2024, 04:03 AM by PixLab.)
Indeed, it seems that wavelet decompose Filters > Enhance > Wavelet-decompose... does not like transparencies (I never tried on a transparent image before, though)
To push further your experiment I even exported the layer with transparencies to png without keeping the color on transparent in the export settings and... wavelet-decompose did put a black background instead, even though, my BG color was white
Thus I would recommend that instead of deleting the transparent area, make a mask save it in the channel
Then put that mask at the layer-group "folder" (or use the deleted area to make a mask via alpha to selection, then Select > Save to Channel, then add mask from channel)
BTW, those are sweet rhinos
Patrice
Posts: 1,039
Threads: 86
Joined: Aug 2018
Reputation:
83
Operating system(s):
- Windows (Vista and later)
Gimp version: 2.10
I didn't comment on the previous post (so as not to lengthen it even more), but I opened another image with a transparent background and wavelet-decompose replaces the transparency with a black background. That didn't surprise me that much, I actually thought it was normal.
I had also never applied this filter to images with transparent backgrounds before.
But on a layer where the background was cut out, wavelet-decompose having the ability to recreate it... that disturbed me a little.
If you pay close attention you will see that in the group created by wavelet-decompose only scale1 respects the situation of the layer at the time the filter is applied.
Other scales and the residual scale add the background that had been removed before.
The fact that the filter acts correctly when applying scale 1 makes me think that there may be an error in the filter code for the other layers and the residual. But this is pure supposition.
Okay, the solution is to apply the mask at the end of the process to eliminate the background that was recreated by the filter.
In my case, as I had created the outline with the Path tool, it basically involves doing the initial steps again: Path to selection, invert, delete.
PixLab, thank you.
.....
Samj Portable - Gimp 2.10.28 - Win-10 /64.
Posts: 544
Threads: 40
Joined: Oct 2016
Reputation:
42
Operating system(s):
- Windows Vista or 7, 8, 10 (64-bit)
Gimp version: 2.10
07-20-2024, 03:20 AM
(This post was last modified: 07-20-2024, 03:22 AM by sallyanne.)
I have found this to happen with other filters as well but cannot 'think' which ones right now. Only that I do not use wavelet decompose that much.
If memory serves I think it happens with some GMIC filters
Posts: 7,108
Threads: 155
Joined: Oct 2016
Reputation:
1,003
Operating system(s):
Gimp version: 2.10
07-20-2024, 07:27 AM
(This post was last modified: 07-20-2024, 07:31 AM by rich2005.
Edit Reason: typo
)
If you want to preserve the transparency, use the alpha lock. Like sallyanne notes often happens with the gimp_gmic_qt plugin.
Posts: 1,039
Threads: 86
Joined: Aug 2018
Reputation:
83
Operating system(s):
- Windows (Vista and later)
Gimp version: 2.10
Sallyanne and rich2005, you are right about this occurrence being present in G'MIC; at least in the Samj-Details-Sharpen [Wavelet] filter.
An interesting test is that after applying alpha to lock to the layer and then using a brush to scribble on the layer in the transparent area, none of these scribbles will be visible. But after G'MIC Samj-Details-Sharpen [Wavelet], in the preview these scribbles are clearly visible.
rich2005, alpha to lock was a smart solution!
However, when using the filter via Filters-Enhance-Wavelet-decompose and having applied alpha to lock, the result presents a black halo (or with part of the background removed when this is the case) around the image.
In the case of G'MIC, care must be taken when selecting the output. If the option chosen is 'On site (default), ok. But if "New layers" is chosen, the result will display a black background (or the entire image will be displayed if the background is not transparent).
Grateful for the attention!
.....
Samj Portable - Gimp 2.10.28 - Win-10 /64.
Posts: 1,500
Threads: 68
Joined: May 2021
Reputation:
167
Operating system(s):
Gimp version: 2.10
07-21-2024, 06:30 AM
(This post was last modified: 07-21-2024, 06:30 AM by PixLab.)
(07-20-2024, 02:09 PM)Krikor Wrote: rich2005, alpha to lock was a smart solution!
However, when using the filter via Filters-Enhance-Wavelet-decompose and having applied alpha to lock, the result presents a black halo (or with part of the background removed when this is the case) around the image.
In the case of G'MIC, care must be taken when selecting the output. If the option chosen is 'On site (default), ok. But if "New layers" is chosen, the result will display a black background (or the entire image will be displayed if the background is not transparent).
Grateful for the attention!
Indeed the lock alpha does work... thank you Rich for the wake-up
Thank you as well Krikor for your tests with G'MIC and show the difference with the output on a new layer.
Patrice
|