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

How to set the data on an ImageData struct? #376

Open
tversteeg opened this issue Nov 10, 2019 · 2 comments
Open

How to set the data on an ImageData struct? #376

tversteeg opened this issue Nov 10, 2019 · 2 comments

Comments

@tversteeg
Copy link

I know I can create image data by doing:

let image_data = context.create_image_data(width, height)?;

And applying it on the context with:

context.put_image_data(image_data, 0.0, 0.0)?;

But how can I actually change the values of the pixels of the image_data object? No functions for it are exposed and the .data field is private.

@tversteeg tversteeg changed the title How to set the data on a ImageData struct? How to set the data on an ImageData struct? Nov 10, 2019
@Pauan
Copy link
Contributor

Pauan commented Nov 10, 2019

It seems we're missing the data getter. Could you send a pull request for that?

@tversteeg
Copy link
Author

Is this good? #377

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

No branches or pull requests

2 participants