Gimp-Forum.net
Apply alpha values from one image to another? - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Apply alpha values from one image to another? (/Thread-Apply-alpha-values-from-one-image-to-another)



Apply alpha values from one image to another? - ottenm - 02-22-2024

I have two identically-sized .png's that both contain (only) a large, solid circle.

In one image the circle has a few pixels around the perimeter that fade to transparent (barely noticeable at first, and gradually fading more until the last pixels at the very edge of the circle are almost completely transparent). 

The other image contains only completely solid pixels (within the circle), and completely empty pixels (outside the perimeter).

Is there a way to apply (just) the alpha values from the first image, to the second one? (so the second one also fades gradually to transparent around the perimeter)

Thanks for any help!


RE: apply alpha values from one image to another? - rich2005 - 02-22-2024

(02-22-2024, 06:28 PM)ottenm Wrote: I have two identically-sized .png's that both contain (only) a large, solid circle.
...snip....
Is there a way to apply (just) the alpha values from the first image, to the second one? (so the second one also fades gradually to transparent around the perimeter)

More context to the question required. 
Are the circles the same colour / pattern and are they on a background image of some sort ?
Always better if you can give some sort of screenshot and your Gimp version / OS.

--------------------
Edit: A couple of thoughts before I pack in for the day.
- The png is a circle on transparency. Make a layer mask Layer -> Mask -> Add Layer Mask -> Transfer layers alpha channel. Copy the layer mask and paste into a plain white layer mask on the other image.

Nothing to do with the alpha channel but
- Try Filters -> Enhance -> Antialias  but it is a very mild effect. Slightly better is the same using the gmic plugin from http://www.gmic.eu
- Try a very small value of gaussian blur.


RE: apply alpha values from one image to another? - Tas_mania - 02-22-2024

Quote:both contain (only) a large, solid circle.
Why not use the first one and change the color with Colors > Hue Saturation or similar?


RE: apply alpha values from one image to another? - Ofnuts - 02-22-2024

(02-22-2024, 06:28 PM)ottenm Wrote: I have two identically-sized .png's that both contain (only) a large, solid circle.

In one image the circle has a few pixels around the perimeter that fade to transparent (barely noticeable at first, and gradually fading more until the last pixels at the very edge of the circle are almost completely transparent). 

The other image contains only completely solid pixels (within the circle), and completely empty pixels (outside the perimeter).

Is there a way to apply (just) the alpha values from the first image, to the second one? (so the second one also fades gradually to transparent around the perimeter)

Thanks for any help!
  • Open the first image (the one you want to change)
  • File > Open as layer the fading circle
  • Drag that new layer under the initial layer in the Layers list
  • Right click the initial layer, Edit Layer Attributes and set the Composite mode to Clip to backdrop
If there are other layers, just put these two layers in a group by themselves, the resulting group will behave like a single layer

[attachment=11266]