Skip to content

Canvas and layers feature #68

Description

@anthonynsimon

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 :)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions