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
Hi, i noticed in some cases scaling is wrong. Example(resizeableCropArea=NO):
Image size: 200x100
Crop size: 120x110
I also noticed that it works OK when resizableCropArea=YES due to different scaling calculation. Using this seems to solve all problems for me, including square images, tested on 20+ images:
-(CGRect)_calcVisibleRectForCropArea
{
CGFloat scale = self.imageView.image.size.width / self.imageView.frame.size.width;
scale *= self.scrollView.zoomScale;
//extract visible rect from scrollview and scale it
CGRect visibleRect = [scrollView convertRect:scrollView.bounds toView:imageView];
visibleRect = GKScaleRect(visibleRect, scale);
return visibleRect;
}
Note: I always set images to normal orientation before passing them to GKImageCropViewController, otherwise it doesn't work.
BTW: Navigation bar sometimes disappears :P
The text was updated successfully, but these errors were encountered:
Hi, i noticed in some cases scaling is wrong. Example(resizeableCropArea=NO):
Image size: 200x100
Crop size: 120x110
I also noticed that it works OK when resizableCropArea=YES due to different scaling calculation. Using this seems to solve all problems for me, including square images, tested on 20+ images:
Note: I always set images to normal orientation before passing them to GKImageCropViewController, otherwise it doesn't work.
BTW: Navigation bar sometimes disappears :P
The text was updated successfully, but these errors were encountered: