{"id":13435988,"url":"https://github.com/roverdotcom/pet-focus","last_synced_at":"2025-04-13T04:32:56.020Z","repository":{"id":146067322,"uuid":"196631917","full_name":"roverdotcom/pet-focus","owner":"roverdotcom","description":"An image view that automatically centers on dogs and cats.","archived":false,"fork":false,"pushed_at":"2019-08-13T22:46:11.000Z","size":13544,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T21:46:01.338Z","etag":null,"topics":["cats","dogs","ios","ios13","pets"],"latest_commit_sha":null,"homepage":"https://www.rover.com/blog/engineering/post/detecting-pets-with-the-ios-vision-framework/","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/roverdotcom.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-12T19:06:53.000Z","updated_at":"2024-10-24T03:49:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"b7eafa70-d2be-4401-a548-6e89e4b3e02c","html_url":"https://github.com/roverdotcom/pet-focus","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/roverdotcom%2Fpet-focus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roverdotcom%2Fpet-focus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roverdotcom%2Fpet-focus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roverdotcom%2Fpet-focus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roverdotcom","download_url":"https://codeload.github.com/roverdotcom/pet-focus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248664257,"owners_count":21141921,"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":["cats","dogs","ios","ios13","pets"],"created_at":"2024-07-31T03:00:41.716Z","updated_at":"2025-04-13T04:32:54.903Z","avatar_url":"https://github.com/roverdotcom.png","language":"Swift","readme":"# PetFocus\n\nPetFocus is an image view that automatically centers images on any pets (dogs or cats) shown in the image. It's useful when cropping photos to squares or circles. Pets don't always cooperate when they're having their photos taken, so PetFocus helps show the best part of any photo, no matter how it actually turned out.\n\nPetFocus is usable in projects deployed on iOS 10 and up, but will only perform pet-focused cropping on iOS 13. When running on versions older than iOS 13, PetFocus will fall back to the default cropping behavior.\n\nRead more about the creation of PetFocus on the [Rover Engineering blog](https://www.rover.com/blog/engineering/post/detecting-pets-with-the-ios-vision-framework/).\n\n## Installing\n\n### Swift Package Manager\n\nIn Xcode 11, you can use the new Swift Package Manager integration to add PetFocus to your project. Select the menu item File \u003e Swift Packages \u003e Add Package Dependency… and enter in the PetFocus repository URL to add the package to your project:\n\n```\nhttps://github.com/roverdotcom/pet-focus.git\n```\n\n### Carthage\n\nIf your project doesn't currently use Swift Package Manager, you can also use [Carthage](https://www.github.com/Carthage/Carthage). If your project is already using Carthage, just add PetFocus to your Cartfile:\n\n```ruby\ngithub \"roverdotcom/pet-focus\" == 0.0.2\n```\n\n### CocoaPods\n\nPetFocus can also be added via [CocoaPods](http://cocoapods.org/). Simply add the following to your Podfile:\n\n```ruby\npod 'PetFocus', :git =\u003e 'https://github.com/roverdotcom/pet-focus.git'\n```\n\n## Usage\n\nPetFocus provides `PetFocusedImageView`, a drop-in replacement for `UIImageView`. It can be used in exactly the same way as a `UIImageView`.\n\n```swift\nimport PetFocus\n\nclass PetViewController: UIViewController {\n    func viewDidLoad() {\n        let imageView = PetFocusedImageView(frame: CGRect(x: 0, y: 0, width: 200, height: 200))\n        addSubview(imageView)\n        imageView.image = myDogImage\n    }\n}\n```\n\n## License\n\nPetFocus is available under the [MIT License](https://choosealicense.com/licenses/mit/). See the LICENSE file for details.","funding_links":[],"categories":["Software"],"sub_categories":["Photography"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froverdotcom%2Fpet-focus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froverdotcom%2Fpet-focus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froverdotcom%2Fpet-focus/lists"}