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

Add buf(), buf_mut() and into_buf() #8

Merged
merged 1 commit into from
Jul 28, 2018

Conversation

yoanlcq
Copy link
Contributor

@yoanlcq yoanlcq commented Jul 28, 2018

Hello,

This adds accessors to Img's buf member and deprecates direct access to it.

I "need" this because I'm using ImgRef as a container to transfer image data to OpenGL, which requires a pointer to the pixels.
This cannot be done efficiently with iterators (technically it can, but it's hacky), and I don't feel comfortable about directly using the buf member knowing it will be private someday.
In short, it feels like Img "steals" the container from me, and I'd like it back :)

Thanks in advance :) I acknowledge that this is probably a bit petty and the newly introduced deprecated warnings may annoy a bunch of people.

@kornelski kornelski merged commit f7572f4 into kornelski:master Jul 28, 2018
@kornelski
Copy link
Owner

Thank you

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

Successfully merging this pull request may close these issues.

2 participants