Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pixels should be blended with normal blend mode when the backdrop is transparent pixel #1096

Closed
dacap opened this issue Apr 26, 2016 · 0 comments

Comments

Projects
None yet
2 participants
@dacap
Copy link
Member

commented Apr 26, 2016

Basically, we should ignore special blending modes when we've to composite pixels over transparent. Instead of applying the layer blending mode to the checked grid (which are transparent pixels for the UI, and do not represent the final result), we should use the normal blending mode when the final pixel/backdrop is transparent. (It is what Photoshop does in this case.)

When we have a layer with non-Normal blending mode (e.g. Overlay blending mode), we've to take special care of pixels that are composite with the transparent background (the gray checked background). For those pixels, the Normal blending mode must be used anyway (because the final render when we export cannot identify that those pixels should be rendered with other blending mode, there is no-blending mode property per pixel in the final render/or file format).


Example: Here's the duck is the foreground layer with the Color blending mode, and the gradient is at the bottom:

  • This is the old blending mode, pixels that are blended over the checked background are blended with the Color blending mode anyway (makes sense only for a preview point of view, but not for persistence):
    screen shot 2019-02-26 at 08 14 39

  • This is the new blending mode, pixels that are blended over the checked background are blended with the Normal blending mode:
    screen shot 2019-02-26 at 08 14 46

  • When we export with the old blending mode we get this (pixels are blended with transparent, without check background, so we lost the original pixel information):
    color-old-render

  • And when we export with the new blending mode we get this other result (we do not lost the original pixel information):
    color-new-render

In this way the new blending mode is consistent between Visual Preview <-> Export Result on disk.

@dacap dacap added the bug label Apr 26, 2016

@dacap dacap added this to the v1.2 milestone Apr 26, 2016

@dacap dacap modified the milestones: v1.2, v1.2-bugs Sep 12, 2017

@dacap dacap self-assigned this Jan 31, 2019

@dacap dacap referenced this issue Feb 1, 2019

Open

Aseprite v1.2.12 #1997

15 of 49 tasks complete

@dacap dacap assigned Gasparoken and unassigned dacap Feb 14, 2019

Gasparoken added a commit to Gasparoken/aseprite that referenced this issue Feb 27, 2019

@dacap dacap closed this in f535448 Mar 9, 2019

@dacap dacap modified the milestones: v1.x-bugs, v1.2 Apr 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.