Gimp

Add alpha channel

  • 'Colours -> Colour to Alpha...'

Extract alpha to single png (useful when using a separate compressed texture for the alpha channel on android)

  1. 'Colours -> Components -> Decompose...' ('RGBA', uncheck 'Decompose to Layers...')
  2. right click on image and 'Export As...'

Add greyscale image as an alpha channel to image

  1. Add an alpha channel to the image you want to mask 'Layer -> Transparency -> Add Alpha Channel'
  2. Right click the image layer in the layers panel, and click 'Add Layer Mask...'. The fill you choose for the mask doesn't matter at this stage - white or black will do.
  3. Open the other image you want to use as a mask, and select all 'Ctrl + A', and copy it, 'Ctrl + C'
  4. Back in the other image, select the layer mask thumbnail by clicking on it in the layers panel
  5. Paste the mask you copied earlier 'Ctrl + V'
  6. Hit the anchor icon or 'Ctrl + H', to anchor the floating selection to the layer mask.