You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.
This bug occurs with the resizedImageWithContentMode method.
I am passing an image whose dimensions are reported to be 4877x3515. When I supply a bounds parameter of 1000x1000, the resultant image's size is 1001x721.
This bug occurs with the resizedImageWithContentMode method.
I am passing an image whose dimensions are reported to be 4877x3515. When I supply a bounds parameter of 1000x1000, the resultant image's size is 1001x721.
I believe the bug is on this line:
CGSize newSize = CGSizeMake(self.size.width * ratio, self.size.height * ratio);
It looks like the resultant width is 1000.0001. The resultant width and height should be
MIN
ed with thebounds
parameter:CGSize newSize = CGSizeMake(MIN(bounds.width, self.size.width * ratio), MIN(bounds.height, self.size.height * ratio));
The text was updated successfully, but these errors were encountered: