It is currently Sat May 18, 2013 8:00 am


Latest GIMP Scripts & Plug-ins

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 25 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: How copy a layer as layer mask
PostPosted: Tue Feb 28, 2012 3:53 am  (#11) 
Offline
GimpChat Member
User avatar

Joined: Oct 25, 2010
Posts: 1295
PhotoComix wrote:
Rod wrote:
Cant you just create a new layer add a mask and select the other layer and copy and paste the layer into the mask?
that was what i planned but copy and paste on the layermask doesn't work (that just create a floating selection)

Hehe.... actually you were on the right track... it creates a floating selection but if you are working on a layer mask, anchoring the selection puts it in the mask. So it's actually quite simple :)

_________________
Image


Top
 Profile  
 

 Post subject: Re: How copy a layer as layer mask
PostPosted: Tue Feb 28, 2012 6:04 am  (#12) 
Offline
GimpChat Member
User avatar

Joined: Apr 23, 2010
Posts: 814
Location: not from Guildford after all
I have made a minor revision of the script to better handle text layers. If the above layer is a text layer and it has a layermask then there is no change in the behavior; that layermask is added to the active layer.

However, if the above layer is a text layer without a layermask (a fairly common occurrence for text layers), then the layermask will be created from the text itself, regardless of the color of the text.

The reason for this change is that the transparent background of a layer gets converted to black when copied to a mask. For a text layer this generally is not how you want the mask to be created. For example, if you have black text then the resulting mask would be entirely black. Other colors except for pure white would be some shade of gray. The script now assumes that you want the text part of the mask to be white.

Here is the new link (I've also updated my previous post):
http://chiselapp.com/user/saulgoode/rep ... from-above

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Profile  
 
 Post subject: Re: How copy a layer as layer mask
PostPosted: Tue Feb 28, 2012 7:56 am  (#13) 
Offline
GimpChat Member
User avatar

Joined: Sep 06, 2011
Posts: 363
Location: US, Ohio
PhotoComix wrote:
GIMP Version: 2.7.5
Operating System: Windows
OS Version: XP - SP3
GIMP Experience: Basic Level



I forgot it!
i have a bw image that i need to paste as layermask...should be simple but i am stuck i even look the help but didn't helped much :gaah

PS i loaded the image i want copy as layermask as layer, it has same size of the other layer



I usually paste the image as a layer, and then right click on the newly created layer and click "add layer mask."

I then initialize the layer mask to "grayscale copy of layer."

After that I right-click on the newly created layer mask and click "mask to selection"

I the right click on the layer I want my mask on and click "add layer mask"
I initialize the mask to selection.


Top
 Profile  
 
 Post subject: Re: How copy a layer as layer mask
PostPosted: Tue Feb 28, 2012 2:25 pm  (#14) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 8913
Location: "Looking for my eraser" =P
Yes i imagine i should have mentioned "anchor the layer" :)

_________________
Image
Gimp Rocks Blog
Simply Gimp Tutorials
"Once your in the cloud, you're in the net"
____________
OK, . . . . so what's the speed of dark?


Top
 Profile  
 
 Post subject: Re: How copy a layer as layer mask
PostPosted: Tue Feb 28, 2012 7:49 pm  (#15) 
Offline
Gimp Scripts Editor
User avatar

Joined: Feb 18, 2011
Posts: 1553
Location: Australia
Saulgoode on the layer above if the text is black with transparent background the layer mask created is still all black.

_________________
Image


Top
 Profile  
 
 Post subject: Re: How copy a layer as layer mask
PostPosted: Tue Feb 28, 2012 7:59 pm  (#16) 
Offline
GimpChat Member
User avatar

Joined: Apr 23, 2010
Posts: 814
Location: not from Guildford after all
Graechan wrote:
Saulgoode on the layer above if the text is black with transparent background the layer mask created is still all black.

Did you download the updated version of the script mentioned in this post? It is possible I've made a mistake (I made one once before, back in 1993), so let me know if you have the updated version and are still seeing the behavior you describe.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Profile  
 
 Post subject: Re: How copy a layer as layer mask
PostPosted: Wed Feb 29, 2012 3:00 am  (#17) 
Offline
Gimp Scripts Editor
User avatar

Joined: Feb 18, 2011
Posts: 1553
Location: Australia
Just redownloaded and installed, top layer is black text, selected bottom layer is gray background color, there is no mask on either, I run script bottom layer has all black mask. Script has not changed.

_________________
Image


Top
 Profile  
 

 Post subject: Re: How copy a layer as layer mask
PostPosted: Wed Feb 29, 2012 7:02 am  (#18) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 4957
ofnuts wrote:
PhotoComix wrote:
Rod wrote:
Cant you just create a new layer add a mask and select the other layer and copy and paste the layer into the mask?
that was what i planned but copy and paste on the layermask doesn't work (that just create a floating selection)

Hehe.... actually you were on the right track... it creates a floating selection but if you are working on a layer mask, anchoring the selection puts it in the mask. So it's actually quite simple :)


That it what i thought !
but no matter how much i tried the floating selection accepted only to be pasted on the layer below not on its mask (yes i click on the mask in the layer windows to be sure it was active)

PS this using gimp2.7.5 from partha i didn't try with the stable version

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Profile  
 
 Post subject: Re: How copy a layer as layer mask
PostPosted: Wed Feb 29, 2012 7:58 am  (#19) 
Offline
GimpChat Member
User avatar

Joined: Apr 23, 2010
Posts: 814
Location: not from Guildford after all
Graechan wrote:
Just redownloaded and installed, top layer is black text, selected bottom layer is gray background color, there is no mask on either, I run script bottom layer has all black mask. Script has not changed.

Hmmm, strange.
Attachment:
copymask.gif
copymask.gif [ 310.05 KiB | Viewed 259 times ]


What version of GIMP are you using?

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Profile  
 
 Post subject: Re: How copy a layer as layer mask
PostPosted: Wed Feb 29, 2012 7:18 pm  (#20) 
Offline
Gimp Scripts Editor
User avatar

Joined: Feb 18, 2011
Posts: 1553
Location: Australia
Saulgoode I am using 2.6.11 but here is the bug I think, look at the text layer I used.

Image

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

* Login   * Subscribe to RSS Feed


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group