{"id":13428559,"url":"https://github.com/lyrebirdstudio/Croppy","last_synced_at":"2025-03-16T01:32:44.923Z","repository":{"id":35614369,"uuid":"212750589","full_name":"lyrebirdstudio/Croppy","owner":"lyrebirdstudio","description":"Image Cropping Library for Android","archived":false,"fork":false,"pushed_at":"2022-06-02T15:31:31.000Z","size":21850,"stargazers_count":1119,"open_issues_count":16,"forks_count":80,"subscribers_count":20,"default_branch":"master","last_synced_at":"2024-06-07T16:48:30.727Z","etag":null,"topics":["android","crop","crop-image","cropper","imagecropper","kotlin","ucrop","view"],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lyrebirdstudio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-04T06:33:25.000Z","updated_at":"2024-05-23T09:37:03.000Z","dependencies_parsed_at":"2022-07-12T16:11:52.528Z","dependency_job_id":null,"html_url":"https://github.com/lyrebirdstudio/Croppy","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/lyrebirdstudio%2FCroppy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyrebirdstudio%2FCroppy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyrebirdstudio%2FCroppy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyrebirdstudio%2FCroppy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lyrebirdstudio","download_url":"https://codeload.github.com/lyrebirdstudio/Croppy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213282254,"owners_count":15564141,"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":["android","crop","crop-image","cropper","imagecropper","kotlin","ucrop","view"],"created_at":"2024-07-31T01:01:00.454Z","updated_at":"2024-07-31T01:02:06.460Z","avatar_url":"https://github.com/lyrebirdstudio.png","language":"Kotlin","funding_links":[],"categories":["Libraries","Kotlin"],"sub_categories":[],"readme":"# Croppy\n\u003cimg src=\"https://raw.githubusercontent.com/lyrebirdstudio/Croppy/master/art/art.png\"/\u003e\n\n# Basic Usage\n```kotlin\n//Start croppy (source uri is the original image.)\nval cropRequest = CropRequest.Auto(sourceUri = uri, requestCode = 101)\nCroppy.start(this, cropRequest)\n```\n```kotlin\noverride fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {\n      super.onActivityResult(requestCode, resultCode, data)\n      if (requestCode == 101) {\n           imageview.setImageURI(data.data)\n     }\n}\n```\n\n# Custom Usage\n\nCreate cropped image result in external storage\n```kotlin\nval externalCropRequest = CropRequest.Auto(sourceUri = uri, requestCode = RC_CROP_IMAGE)\n```\n\nCreate cropped image result in cache storage\n```kotlin\nval cacheCropRequest = CropRequest.Auto(\n     sourceUri = uri,\n     requestCode = RC_CROP_IMAGE,\n     storageType = StorageType.CACHE\n)\n```\n\nIf you want to create destination file manually\n\n```kotlin\nval destinationUri = ...\nval manuelCropRequest = CropRequest.Manual(\n    sourceUri = uri,\n    destinationUri = destinationUri,\n    requestCode = RC_CROP_IMAGE\n)\n```\n\nIf you want to exclude some specific aspect ratio from bottom aspect ratio list view.\n\n```kotlin\nval excludeAspectRatiosCropRequest = CropRequest.Manual(\n    sourceUri = uri,     \n    destinationUri = destinationUri,\n    requestCode = RC_CROP_IMAGE,\n    excludedAspectRatios = arrayListOf(AspectRatio.ASPECT_FREE)\n)\n```\n\nIf you want to give specific theme as accent color.\n```kotlin\nval themeCropRequest = CropRequest.Manual(\n    sourceUri = uri,\n    destinationUri = destinationUri,\n    requestCode = RC_CROP_IMAGE,\n    croppyTheme = CroppyTheme(R.color.blue)\n)\n```\n\n```kotlin\n//Start croppy with your custom request.\nCroppy.start(this, cropRequest)\n```\n\n# Demo\n\u003cimg src=\"https://github.com/lyrebirdstudio/Croppy/blob/master/art/artgif.gif?raw=true\"/\u003e\n\n# Features\n\n### Double tap focus 👆👆\nIt zooms-in to the touch points on double tap. Restores default state when user double taps on max scale state.\n\n### Pinch Zoom 👌\nZoom in and out with two finger.\n\n### Free Mode 🤟\nYou can crop your image in free mode. In any size.\n\n### Aspect Ratio Mode 📱\nEnhanced aspect ratio mode will help you while cropping. Aspect ratio will be fixed while you play with cropper. So for your social media apps, it will help you to crop in fixed size (instagram, facebook, twitter, 16:9, 1:2, 3:2 and more..)\n\n### Size Displayer 🔟\nWhile you scale your image, size displayer indicates the bitmap size reactively. It will provide a smoother experience to the user.\n\n### Auto Centered 😍\nWhat ever you do while cropping, we center the bitmap with animation. Smoother experience for user.\n\n### Animations 🌟 \nWe use animation everywhere in this cropper. User zoomed-out too much? We zoom back in with animation. User scrolled image out of borders? We scroll it back with animation.\n\n# Setup\n```groovy\nallprojects {\n     repositories {\n\t...\n\tmaven { url 'https://jitpack.io' }\n     }\n}\n```\n```groovy\ndependencies {\n      implementation 'com.github.lyrebirdstudio:Croppy:0.2'\n}\n```\n\nLicense\n--------\n\n\n    Copyright 2019 Lyrebird Studio.\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyrebirdstudio%2FCroppy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flyrebirdstudio%2FCroppy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyrebirdstudio%2FCroppy/lists"}