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

Canvas and layers feature #68

Open
anthonynsimon opened this issue Jul 10, 2019 · 0 comments
Open

Canvas and layers feature #68

anthonynsimon opened this issue Jul 10, 2019 · 0 comments

Comments

@anthonynsimon
Copy link
Owner

anthonynsimon commented Jul 10, 2019

Would it be useful to have the functionality to layer changes on top of a canvas? Something like what most visual image editors do.

For example:

result := layer.Flatten(
	layer.Canvas(width, height, backgroundColor),
	layer.Layer(image, blendMode, opacity),
        ...
)

Or more concrete:

result := layer.Flatten(
	layer.Canvas(1280, 720, bg.Black),
	layer.Layer(img1, blend.Normal, 1.0),
	layer.Layer(blur.Gaussian(img1, 0.1), blend.Multiply, 0.5),
	layer.Layer(effect.Sharpen(img2), blend.SoftLight, 0.25),
)

This would require thinking about how to handle things like:

  • Should the layers be applied in order or in reverse order?
  • How would we specify the position of the layer in respect to the other layers on the canvas?
  • Which settings for the flattening and canvas should we expose? interpolation, colorspace, BQ, etc...

But let's discuss if this would be useful in first place, and if so for which use cases :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant