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 compose module and functions #662

Merged
merged 2 commits into from
Jun 9, 2024
Merged

Conversation

ripytide
Copy link
Member

@ripytide ripytide commented May 30, 2024

This PR relies on #647 for the Rect type.

I have more functions that fit in this category I'd like to add in the future but I thought I'd start with some basic ones.

I've added three main functions crop(), flip_horizontal() and flip_vertical().

This is part of the wider effort of migrating function from image::imageops image-rs/image#2238

@theotherphil
Copy link
Contributor

This looks good except for the Rect changes, thanks.

None of these functions are “composing” images in any sense I can think of, but I can’t think of a good name off the top of my head. I’m happy to merge this without the Rect change and worry about module names before the next version is released

@ripytide
Copy link
Member Author

ripytide commented Jun 8, 2024

I think I chose the name "compose" from some functions from imageops, mainly replace() and overlay() which combine multiple images hence the name compose. Though you're right the mirror and rotate functions don't really fit but I couldn't think of any other names at the time so I though I'd just put them all in the compose module. Feel free to change the module naming at any point.

@ripytide
Copy link
Member Author

ripytide commented Jun 9, 2024

Okay I've removed the Rect changes 👍

@theotherphil
Copy link
Contributor

Thanks! It would be nice to have a benchmark for the cropping function to see if the parallelization actually helps, but that isn't a blocker to merging.

@theotherphil theotherphil merged commit c799551 into image-rs:master Jun 9, 2024
15 checks passed
@ripytide ripytide deleted the compose branch June 9, 2024 16:02
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