Skip to content

Instantly share code, notes, and snippets.

@jcsalterego
Created August 19, 2011 17:11
Show Gist options
  • Select an option

  • Save jcsalterego/1157379 to your computer and use it in GitHub Desktop.

Select an option

Save jcsalterego/1157379 to your computer and use it in GitHub Desktop.
how to turn a grayscale image into an alpha-transparent graphic
===============================================================
originally i tried applying a grayscale image as a layer mask for a
base color, but there's no way to do that. can't copy and paste into
an existing layer mask either. one can only take an existing layer
and turn it into a clipping mask, which doesn't help here.
1. create layer with base color, e.g. black
2. create layer with grayscale image
3. select all in layer with grayscale image
4. copy
5. select base color layer
6. enter quick mask mode: select > edit in quick mask mode
7. paste
8. leave quick mask mode: select > edit in quick mask mode
9. delete
10. hide/delete original grayscale image
this should work because in the original grayscale image,
white->selected, black->unselected (and everywhere in between),
and then when you go to hit delete outside of quick mask mode,
it will delete the selected/white parts and keep the unselected/black
parts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment