TimOliver / TOCropViewController

A view controller for iOS that allows users to crop portions of UIImage objects
http://www.timoliver.com.au/2015/06/21/tocropviewcontroller-an-open-source-image-cropper-for-ios/
MIT License
4.68k stars 932 forks source link

square image with circular cropping #497

Open yuriandryu opened 2 years ago

yuriandryu commented 2 years ago
image image

with circular cropping, I would like to be able to get 2 images (round, cropped image) and square image without cropped edges. Please make this opportunity as soon as possible.

ruofeilyu commented 2 years ago

it's a good feature, because if we will usually upload square image to our server in case in the future the avatar change to square style. if you check tiktok, they still keep square avatar image, the circle is just a preview.

erginbilgin commented 2 years ago

This is actually a very useful feature. I also want to let users crop with a circle frame but want to keep the square image later on, in case of design changes in the future. So now I don't use circle just for this reason, and make users crop using rectangle and then round images in the app only by rounding UIImageView.

upscale-duc commented 1 year ago

@yuriandryu use this function let squareImg = self.image.croppedImage(withFrame: cropRect, angle: angle, circularClip: false)

upscale-duc commented 1 year ago

image