{"id":1514,"url":"https://github.com/ZaidPathan/ZImageCropper","last_synced_at":"2025-08-06T13:32:53.342Z","repository":{"id":56661090,"uuid":"46071636","full_name":"ZaidPathan/ZImageCropper","owner":"ZaidPathan","description":"A Swift 5 repo to crop image in any shape.","archived":false,"fork":false,"pushed_at":"2020-10-26T17:09:59.000Z","size":2871,"stargazers_count":233,"open_issues_count":1,"forks_count":40,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-07-17T08:26:14.014Z","etag":null,"topics":["crop-image","ios","swift","swift5"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZaidPathan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-12T18:17:25.000Z","updated_at":"2024-07-09T06:36:02.000Z","dependencies_parsed_at":"2022-08-15T22:50:25.194Z","dependency_job_id":null,"html_url":"https://github.com/ZaidPathan/ZImageCropper","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZaidPathan%2FZImageCropper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZaidPathan%2FZImageCropper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZaidPathan%2FZImageCropper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZaidPathan%2FZImageCropper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZaidPathan","download_url":"https://codeload.github.com/ZaidPathan/ZImageCropper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":215780271,"owners_count":15929791,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crop-image","ios","swift","swift5"],"created_at":"2024-01-05T20:15:48.250Z","updated_at":"2024-08-17T16:30:57.993Z","avatar_url":"https://github.com/ZaidPathan.png","language":"Swift","funding_links":[],"categories":["Media","Libs","Images [🔝](#readme)"],"sub_categories":["Image","Images","Other free courses"],"readme":"# ZImageCropper\n\n[![CI Status](https://img.shields.io/travis/ZaidPathan/ZImageCropper.svg?style=flat)](https://travis-ci.org/ZaidPathan/ZImageCropper)\n[![Version](https://img.shields.io/cocoapods/v/ZImageCropper.svg?style=flat)](https://cocoapods.org/pods/ZImageCropper)\n[![License](https://img.shields.io/cocoapods/l/ZImageCropper.svg?style=flat)](https://cocoapods.org/pods/ZImageCropper)\n[![Platform](https://img.shields.io/cocoapods/p/ZImageCropper.svg?style=flat)](https://cocoapods.org/pods/ZImageCropper)\n\nZImageCropper is a simplest way to crop image to any shapes you like.\n\n![alt ZImageCropper](https://github.com/ZaidPathan/ZImageCropper/blob/master/giphy.gif)\n\n## Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Requirements\n\n## Installation\n\n### Cocoapods\nZImageCropper is available through [CocoaPods](https://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'ZImageCropper'\n```\n\n### Swift Package Manager\n\nThe [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into Xcode and the Swift compiler.\n\nIf you are using Xcode 11 or later:\n 1. Click `File`\n 2. `Swift Packages`\n 3. `Add Package Dependency...`\n 4. Specify the git URL for `ZImageCropper`.\n \n ```swift\n https://github.com/ZaidPathan/ZImageCropper\n ```\n\n### Manual\nAdd ` ZImageCropper.swift` and ` ZImageCropperView.swift` files to your project.\n\n## Usage\n### Crop using AI (Or programmatically)\n\nCrop image using following code,\n\n```swift\nlet croppedImage = ZImageCropper.cropImage(ofImageView: yourImageView, withinPoints: [\nCGPoint(x: 0, y: 0),   //Start point\nCGPoint(x: 100, y: 0),\nCGPoint(x: 100, y: 100),\nCGPoint(x: 0, y: 100)  //End point\n])\n```\n\nNote : Make sure you provide valid points, points must be \u003e=2 in count.\n\n### Crop using user touches,\n**Step 1:** Add `UIImageView` to your `StoryBoard/XIB` and give it a Class Name: `ZImageCropperView`\n\n**Step 2:** Run the app and see cropping is enable to your `UIImageView`\n\n**Step 3:** Add `@IBOutlet` of your `UIImageView` and call method `imageView.cropImage()` to crop selected layer by user.\n\n## Author\n\nZaid Pathan\n\n## Contributor\n\n[Zaid Pathan](http://github.com/ZaidPathan), [Devansh Vyas](http://github.com/devanshvyas)\n\n## License\n\nZImageCropper is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZaidPathan%2FZImageCropper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FZaidPathan%2FZImageCropper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZaidPathan%2FZImageCropper/lists"}