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

[PATCH] Added offsets to SubImage to compensate for the now-deprecated bounds call from GenericImageView. #2126

Merged
merged 3 commits into from Feb 20, 2024

Conversation

brykgroup-andrews
Copy link
Contributor

@brykgroup-andrews brykgroup-andrews commented Feb 2, 2024

Fixes #2118

@fintelia It worked this time lol

@fintelia
Copy link
Contributor

I think the offsets method makes sense on the SubImage struct, but I'm not really sure we should expose it on GenericImageView. The difference is that the GenericImageView (for immutable access) and GenericImage (for mutable access) traits should be implementable for any sort of image. For most of them, the concept of an offset from a different origin doesn't make a ton of sense.

@brykgroup-andrews
Copy link
Contributor Author

I'm down with that, if that's more reasonable. However the reason I did it on GenericImageView is that the old interface also provided it - it allows the method to be used in the same contexts as the previous one. If you think it would be better to move it still in spite of this, I'm happy to make the change.

@brykgroup-andrews
Copy link
Contributor Author

@fintelia Not sure if your thumbs up is saying you agree it should be as-is, or if you want me to make the change anyway. Which route do you want me to go down - implementing your initial suggestion, or keeping it as-is for the reasons I provided?

@fintelia
Copy link
Contributor

Please add the method on SubImage but not on GenericImageView.

@brykgroup-andrews brykgroup-andrews changed the title [PATCH] Added offsets to GenericImageView to compensate for the now-deprecated bounds call. [PATCH] Added offsets to SubImage to compensate for the now-deprecated bounds call from GenericImageView. Feb 19, 2024
@brykgroup-andrews
Copy link
Contributor Author

@fintelia should be good to go!

@fintelia fintelia merged commit 0fbf449 into image-rs:master Feb 20, 2024
35 checks passed
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.

No method to get xoffset/yoffset from SubImage after deprecating bounds() in #2036
2 participants