It is currently Sun Jul 21, 2024 4:17 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: layer mode
PostPosted: Mon Jan 12, 2015 5:32 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
GIMP Version: 2.8.10
Operating System: Windows
GIMP Experience: Beginner Level



Hi all gimp-gurus,
I'm interested in better understanding how the following layer modes operate:
- "erase"
- "replace"
- "anti-erase"

they are the last 3 available as usable modes when writing a script, they are NOT available AFAIK when gimp is used interactively
I made some (simply) tests and I found out that:
a) they are in any case ALL replaced in the Layers'Panel by "normal"
b) if the base layer (the one to which other layers are then added using one of the mentioned modes) has no alpha channel, then the effect is actually the same as "normal"
c) if the base layer has alpha channel, then:
c1 - "replace" acts apparently like "normal" (but I suspect there are differences)
c2 - "erase" removes the (equivalent color?) pixels from the base layer
c3 - "anti-erase" maybe does the opposite of "erase" but I'm not sure
I couldn't make too many experiments because -as they are not available interactively- I had always to change the source in the script then refresh

If someone knows in details the full bevaviour of those modes, I would be grateful.
(BTW: why are they not available interactively?)

_________________
"Where am I ?"


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: layer mode
PostPosted: Mon Jan 12, 2015 8:42 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14715
Location: USA
Quote:
(BTW: why are they not available interactively?)

I believe these are available under the FADE option in the edit menu. Run a filter then run Edit>fade effect.
Image

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: layer mode
PostPosted: Mon Jan 12, 2015 9:27 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
thanks Rod!
so they are a sort of "After-the-Filter" modification
now I can understand a little better (just a little...) their use interactively
but how can be used in a script? after having run (called, executed) a filter?
do you know any example of that?
thanks

_________________
"Where am I ?"


Top
 Post subject: Re: layer mode
PostPosted: Mon Jan 12, 2015 9:30 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14715
Location: USA
dinasset wrote:
thanks Rod!
so they are a sort of "After-the-Filter" modification
now I can understand a little better (just a little...) their use interactively
but how can be used in a script? after having run (called, executed) a filter?
do you know any example of that?
thanks

No i don't think i ever saw this option used in an effect filter. :)
Nothing in PDB either.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: layer mode
PostPosted: Mon Jan 12, 2015 10:03 am  (#5) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
dinasset wrote:
b) if the base layer (the one to which other layers are then added using one of the mentioned modes) has no alpha channel, then the effect is actually the same as "normal"
c) if the base layer has alpha channel, then:
c1 - "replace" acts apparently like "normal" (but I suspect there are differences)

'Replace' mode uses the alpha channel of the top layer to produce the resulting alpha regardless of the value (or even presence) of the alpha below it. Note that the resulting alpha then gets blended with the alpha of the lower layer based upon the Opacity setting.

dinasset wrote:
c2 - "erase" removes the (equivalent color?) pixels from the base layer
c3 - "anti-erase" maybe does the opposite of "erase" but I'm not sure

For both 'erase' and 'anti-erase' modes, the RGB channels of the top layer are ignored.

'Erase' mode subtracts the alpha channel of the top layer from the alpha channel of the bottom to produce the resulting alpha. Again, the resulting alpha then gets blended with the alpha of the lower layer based upon the Opacity setting.

'Anti-erase' mode adds the alpha channel of the top layer to the alpha channel of the bottom to produce the resulting alpha. And then the resulting alpha gets blended with the alpha of the lower layer based upon the Opacity setting.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: layer mode
PostPosted: Mon Jan 12, 2015 10:39 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14715
Location: USA
Found it in the PDB also. :)
Image

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) layer mode preview stopped working

3

No new posts PARTIALLY SOLVED How does it work on layer blendng mode "Normal"

1

No new posts Attachment(s) Default vs. Legacy: "Subtract" Layer Mode: Different results

8

No new posts Attachment(s) How does it works on Layer Blending Mode "Add" with Alpha Channel?

4

No new posts Attachment(s) Adding a image as a layer, moving layer, and then flattening

2



* Login  



Powered by phpBB3 © phpBB Group