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 replace() and overlay() functions #666

Merged
merged 3 commits into from
Jun 22, 2024

Conversation

ripytide
Copy link
Member

@ripytide ripytide commented Jun 9, 2024

Two more functions migrated and re-implemented for image-rs/image#2238

@ripytide ripytide reopened this Jun 9, 2024
bottom
}
#[doc=generate_mut_doc_comment!("replace")]
pub fn replace_mut<P>(bottom: &mut Image<P>, top: &Image<P>, x: u32, y: u32)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the error type on the GenericImage function is a bit clunky.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't see copy_from(), I think the functions are similar but being based on GenericImage may also have performance issues as we've found previously.

Also technically it is an image processing operation so belongs here more than in image but I don't feel too strongly about that.

@theotherphil theotherphil merged commit 350512f into image-rs:master Jun 22, 2024
15 checks passed
@ripytide ripytide deleted the compose2 branch June 22, 2024 12:47
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