Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing alpha channel to be completely opaque
#1
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)
Reply
#2
(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)
Reply
#3
(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.
Reply


Forum Jump: