how to preserve transparency after applying ian's noise reduction 2019

hi all, does anyone know how to preserve image transparency when using Iain Fergusson’s denoising filter? the previous version (before 2019 update) used to preserve transparency but the current one does not. i am using Gimp 2.10.36 and G’mic 3.3.3.

Iain’s fast denoise version which has not been updated since 2015 preserves the image’s transparency but doesn’t have as many features.

to demonstrate what i mean, i have uploaded before and after images of this star image after applying Iain’s denoising filter. the background of the star image becomes white after the filter. the preview image also shows a white background which makes it more difficult to see the changes.

the only way i have found to get around this issue is to “alpha to selection” the image, feather the selection by 5 pixels and then apply the filter.

I am a graphic designer who does a lot of kit bashing of different images into 1 composite image so I would to find an easier solution to this.

thanks
illy_vs_indd_



Maybe @Iain could have a look?
If he has no time for that, I may give a try to “fix” that.
Preserving alpha-channel in a filter is usually doable with a few lines of code.

May be a bit more than a one or two line fix (but not insurmountable). Iain’s de-noising softens the outer edge (red lines to transparent), so the alpha transparency channel has to follow suite (Can’t use the original, unaltered transparency channel; it’s a hard edge).

1 Like

I will have a look at it.

It’s a bit more complicated than I thought because 1) the filter can accept a guide image 2) the preview can show multiple views

2 Likes

thanks a lot @Iain ! if it’s too tricky to change the 2019 denoiser, is it possible to add the pre-2019 denoiser to the current g’mic package instead? i.e. name it as “iain’s noise reduction (pre-2019)”

thanks again!

I thought about it some more and there are some issues. I think the best thin is to have another filter for denoising of transparent images.

One issue is how to handle details that appear in the alpha channel. If the filter ignores them then the details in the opaque and transparent channels may no longer match. Eg edges may not line up properly in both versions.

Can you give me more information about what you use the filter for? And what features do you use in the current filter?

1 Like

hi, thanks for the quick reply.

I am a graphic designer and i do a lot of kit bashing. i “cut out” parts of images from public domain paintings which are sometimes of poor resolution / noisy and combine them with other sharper images.

i haven’t used much of the current / post 2019 filter because it doesn’t preserve transparency. however the filter pre-2019 is still one of my favs as it doesn’t warp the image as much after application. hence i was wondering if it’s possible to include the pre-2019 filter in the current g’mic package. thanks.

update: edited to say that i normally denoise paintings and not photos of actual people

I am working on something for you, but my GMIC is a bit rusty.

@Iain take your time.

is it possible to add the pre-2019 denoise filter as it is to the latest g’mic built? or is it dependent on the libraries of gimp or g’mic?

thanks a lot for this voluntary work. your denoise filters have been valuable to me for many years.

I just discovered that “Iain’s Noise Reduction old” is in the GMIC plugin under Testing → Iain Fergusson

3 Likes

wow! thank goodness you moved the previous one to the testing folder! : D i just tested it and it seems to be the previous / pre-2019 one? thanks!

1 Like

Yes, it’s the pre 2019 version.