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

Compositing on image/solid color #6

Open
hpjansson opened this issue Apr 8, 2023 · 1 comment
Open

Compositing on image/solid color #6

hpjansson opened this issue Apr 8, 2023 · 1 comment
Assignees
Labels
api feature New feature or request

Comments

@hpjansson
Copy link
Owner

Add the ability to composite the scaled output on an existing image buffer or a solid color. Allow origin outside the target image (i.e. negative top-left offsets) with clipping as appropriate and subpixel placement.

@hpjansson hpjansson added feature New feature or request api labels Apr 8, 2023
@hpjansson hpjansson self-assigned this Apr 8, 2023
@hpjansson
Copy link
Owner Author

hpjansson commented Apr 10, 2023

When compositing on a solid color, we need to be able to generate a destination image that's bigger than the source.

This is especially important for the width dimension, since there's no efficient way for the user to manually add columns to an image. Adding rows above/below is much easier; just allocate a bigger buffer, clear the area above/below, and offset the dest pointer. You could do something similar for columns using rowstride, but clearing vertical strips is fiddly and cache-inefficient.

The over-color API should probably be similar to the over-image one; we need to specify dimensions and offset, allow for clipping and so on. The main difference would be that over-color should take a pointer to a single pixel representing the color.

We could take this further and support the general case, where "solid color" would just be a tiled one-pixel image, but that's probably out of scope for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant