Gimp-Forum.net
Changing alpha channel to be completely opaque - 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: Changing alpha channel to be completely opaque (/Thread-Changing-alpha-channel-to-be-completely-opaque)



Changing alpha channel to be completely opaque - programmer_ceds - 02-25-2020

If a layer has an alpha channel with partially transparent pixels (alpha = 1 to 254) the menu option "Layer/Transparency/Threshold Alpha..." can be used to make these pixels fully opaque (alpha = 255).

Is there an existing method for making any fully transparent (alpha = 0) pixels fully opaque (other than by painting over them everywhere they occur in the image)?

Ideally the Threshold Alpha tool would provide a way to do this but I guess it will come down to writing a script if there isn't one already.

(Edit: Just deleting the alpha channel causes any pixels that are not fully opaque to be filled with the background colour - so this, which might appear to be the easy answer, doesn't work)


RE: Changing alpha channel to be completely opaque - Ofnuts - 02-25-2020

(02-25-2020, 05:15 PM)programmer_ceds Wrote: If a layer has an alpha channel with partially transparent pixels (alpha = 1 to 254) the menu option "Layer/Transparency/Threshold Alpha..." can be used to make these pixels fully opaque (alpha = 255).

Is there an existing method for making any fully transparent (alpha = 0) pixels fully opaque (other than by painting over them everywhere they occur in the image)?

Ideally the Threshold Alpha tool would provide a way to do this but I guess it will come down to writing a script if there isn't one already.

(Edit: Just deleting the alpha channel causes any pixels that are not fully opaque to be filled with the background colour - so this, which might appear to be the easy answer, doesn't work)

I would do:
  • Add layer mask, init with "Transfer alpha-channel"
  • Bucket-fill mask with white
  • Apply layer mask
Faster technique:
  • In the Channels dialog, deselect the R/G/B channels (but keep them visible)
  • Bucket fill with any color

(this is more or less the opposite of alpha-locking the layer)


RE: Changing alpha channel to be completely opaque - programmer_ceds - 02-25-2020

(02-25-2020, 05:34 PM)Ofnuts Wrote:
(02-25-2020, 05:15 PM)programmer_ceds Wrote: If a layer has an alpha channel with partially transparent pixels (alpha = 1 to 254) the menu option "Layer/Transparency/Threshold Alpha..." can be used to make these pixels fully opaque (alpha = 255).

Is there an existing method for making any fully transparent (alpha = 0) pixels fully opaque (other than by painting over them everywhere they occur in the image)?

Ideally the Threshold Alpha tool would provide a way to do this but I guess it will come down to writing a script if there isn't one already.

(Edit: Just deleting the alpha channel causes any pixels that are not fully opaque to be filled with the background colour - so this, which might appear to be the easy answer, doesn't work)

I would do:
  • Add layer mask, init with "Transfer alpha-channel"
  • Bucket-fill mask with white
  • Apply layer mask
Faster technique:
  • In the Channels dialog, deselect the R/G/B channels (but keep them visible)
  • Bucket fill with any color

(this is more or less the opposite of alpha-locking the layer)

Thanks that seems to work - although not as quick as being able to change fully transparent pixels to fully opaque using the Threshold alpha tool.