Skip to content

Conversation

@tyt2y3
Copy link

@tyt2y3 tyt2y3 commented Aug 15, 2017

In some personal projects I encounter the use case when I have to use layer mask to implement some Photoshop filters
Naively, we can embed the layer mask into the alpha channel and save the image as a png. This loses the compression ability of jpeg but can still work.
But, in order to mimic the Photoshop adjustment layer, then there is no workaround other than layer mask
image
So, for example, one can do the following to selectively brighten a specific portion of an image

this.newLayer(function () {
    this.copyParent();
    this.filter.exposure(10);
    this.filter.contrast(15);
    this.layerMask('layermask.jpg');
});

tyt2y3 added 2 commits August 14, 2017 20:53
Image was undefined in browser context due to coffeescript declared the Image variable in the first place
An image can be used as a transparency map (white is opaque),
similar to Layer Mask in many photo editors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant