Post Reply 

Make alpha channel from another image

Jul 27, 2011, 15:53
Post: #1
Make alpha channel from another image
I have an existing (grayscale) image that I want to make into the alpha channel for another image. Is this possible?
Find all posts by this user
Quote this message in a reply
Jul 27, 2011, 21:33
Post: #2
RE: Make alpha channel from another image
(Jul 27, 2011 16:06)ofnuts Wrote:  - Open other image
- "File/Open as layers" your alpha channel image
- Create a selection on that layer ("Layer/Transparency/Alpha to selection" if transparent, or select by color if B&W, for instance)
- Back to the layer of your original image
- "Layer/Mask/Add layer mask", initialize to selection
- "Layer/Mask/Apply layer mask"

Many thanks for your swift reply. I've done some tests, but unfortunately the method introduces substantial changes to the grayscale image which I'm trying to avoid.

The images I'm using are derived from the NASA SRTM data in which each pixel represents the height above sea-level of a 3-arcsecond square of the earth's surface. The resulting images have very subtle gradations of (see small sample attached). This subtlety is lost when the 'alpha to selection' function is called.

Oh well - I'll keep at it.

   
Find all posts by this user
Quote this message in a reply
Jul 27, 2011, 22:01
Post: #3
RE: Make alpha channel from another image
Wow! that was quick! Thanks, I'll try it.
Find all posts by this user
Quote this message in a reply
Jul 28, 2011, 09:09 (This post was last modified: Mar 8, 2012 18:47 by ofnuts.)
Post: #4
RE: Make alpha channel from another image
Quote:For this kind of image:
- In original image: Layer/Mask/Add layer mask and init to anything (white is OK)
- Load greyscale image as layer in same image or in another image.
- Select all & copy to clipboard
- Back to original image layer, make sure it's selected, you can also check that Layer/Mask/Edit layer mask is still set
- Edit/paste: this creates a floating selection
- Layer/Anchor layer: moves floating selection to layer mask
- Apply layer mask

Many thanks - worked a treat. You obviously know Gimp as well as Clapton knows his Strat!
Find all posts by this user
Quote this message in a reply
Mar 8, 2012, 18:11
Post: #5
RE: Make alpha channel from another image
(Jul 28, 2011 14:05)ofnuts Wrote:  Clapton is way better with his guitar... I just happen to know a few chords on Gimp Smile
The only problem with this procedure is that the floating selection is created with Edit/paste, not Edit/copy. Being a literalist when it comes to following directions, that threw me for a minute.
Find all posts by this user
Quote this message in a reply
Mar 9, 2012, 00:58 (This post was last modified: Mar 9, 2012 00:59 by PoorDave.)
Post: #6
RE: Make alpha channel from another image
Actually, I just found it by shuffling through the forums looking for interesting tips-- shows you how Asperger's I am, I guess. BTW, now that it's corrected, please feel free to delete this part of the thread, I won't be offended, lol. Also, you're doing great work here, extremely helpful, thanks very much.
Find all posts by this user
Quote this message in a reply
Mar 9, 2012, 14:16
Post: #7
RE: Make alpha channel from another image
Ooops! Sorry I didn't notice the typo when you originally posted it. I guess I must have done Ctrl-V without thinking about it.

BTW, in the end I wrote a stand-alone tool to copy channels from one image to another - not the world's fastest code but quicker than manipulating layers in Gimp when running it on a lot of images.
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  image pasting as translucent ??? mylenek 1 477 Sep 5, 2018 08:21
Last Post: paynekj
  Fading around irregular image WarBeer 2 292 Aug 10, 2018 09:05
Last Post: WarBeer
  display of tiff image (colors wrong?) andife 1 322 Jul 12, 2018 09:03
Last Post: paynekj
  What method would I use in Gimp to fix this image? alock 2 304 May 30, 2018 14:57
Last Post: alock
  Hiding image tab michal.peczak 1 279 May 13, 2018 19:19
Last Post: paynekj

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS