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

ios 11 crash #695

Closed
zombiechou opened this issue Apr 28, 2023 · 1 comment · Fixed by #696
Closed

ios 11 crash #695

zombiechou opened this issue Apr 28, 2023 · 1 comment · Fixed by #696

Comments

@zombiechou
Copy link

I find that when the source image's width bigger than height just 1 pixel, then after called cropping, the result is same to source image. so, image's width is not equal to the height. we should use min(width, height) as radius. Can you fix it?
image

@zzmasoud
Copy link
Contributor

zzmasoud commented May 3, 2023

Hey, just tried to reproduce the failing test and yes! It's failing.

Given image: (W:151, H:150), and the test is already exist:

func _testThatImageIsCroppedToSquareAutomatically() throws {

Failing with:
testThatImageIsCroppedToSquareAutomatically(): XCTAssertEqual failed: ("(151.0, 150.0)") is not equal to ("(150.0, 150.0)")

I'm working on it and will make a PR.

zzmasoud added a commit to zzmasoud/Nuke that referenced this issue May 3, 2023
@kean kean closed this as completed in #696 May 3, 2023
kean added a commit that referenced this issue May 3, 2023
Fix #695: byCroppingToSquare() always return square image
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 a pull request may close this issue.

2 participants