-
Notifications
You must be signed in to change notification settings - Fork 140
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
OutputInfo::line_size should be a method #521
Comments
Also, |
The |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As of v0.17.14, the OutputInfo struct has a pub field
line_size
that seems to be computed entirely from other fields - namely width, height and bit depth.Since the field is public, it is possible for the API user to mutate it and put the whole
OutputInfo
in an inconsistent state where the values of the fields end up conflicting each other.It would be nice to turn one of these fields into a method that computes data from the other values, so that it's no longer possible to create structs with conflicting values.
The text was updated successfully, but these errors were encountered: