{"id":19257444,"url":"https://github.com/takusemba/cropme","last_synced_at":"2025-04-04T22:08:17.994Z","repository":{"id":42596874,"uuid":"103131926","full_name":"TakuSemba/CropMe","owner":"TakuSemba","description":"Extremely Smooth and Easy Cropping library for you","archived":false,"fork":false,"pushed_at":"2024-07-02T17:36:36.000Z","size":34048,"stargazers_count":423,"open_issues_count":11,"forks_count":73,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-28T21:06:42.382Z","etag":null,"topics":["android","android-library","crop-image","cropper","cropping","image","imagecropper","springanimation"],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TakuSemba.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":"2017-09-11T12:15:56.000Z","updated_at":"2025-01-06T15:51:16.000Z","dependencies_parsed_at":"2024-08-01T19:53:41.234Z","dependency_job_id":null,"html_url":"https://github.com/TakuSemba/CropMe","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TakuSemba%2FCropMe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TakuSemba%2FCropMe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TakuSemba%2FCropMe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TakuSemba%2FCropMe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TakuSemba","download_url":"https://codeload.github.com/TakuSemba/CropMe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247256112,"owners_count":20909240,"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","android-library","crop-image","cropper","cropping","image","imagecropper","springanimation"],"created_at":"2024-11-09T19:10:13.825Z","updated_at":"2025-04-04T22:08:17.979Z","avatar_url":"https://github.com/TakuSemba.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CropMe\n\n\u003cimg src=\"https://github.com/TakuSemba/CropMe/blob/master/arts/logo.png\"\u003e\n\n## Gradle\n\n```groovy\n\ndependencies {\n    implementation 'com.github.takusemba:cropme:x.x.x'\n}\n\n```\n\u003cbr/\u003e\n\n## Usage\n\n\u003cimg src=\"https://github.com/TakuSemba/CropMe/blob/master/arts/crop.gif\" align=\"right\" width=\"30%\"\u003e\n\n![Build Status](https://app.bitrise.io/app/1c8ba06a60a25360/status.svg?token=qkQNVMnD0E6PXXhcorNyuQ\u0026branch=master)\n![Download](https://api.bintray.com/packages/takusemba/maven/cropme/images/download.svg)\n![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)\n![API](https://img.shields.io/badge/API-16%2B-brightgreen.svg?style=flat)\n\nThis is an Android library for cropping images. Move images smoothly, and crop images precisely.\n\n### Use CropView in your xml file.\n\n```xml\n  \u003ccom.takusemba.cropme.CropLayout\n    android:id=\"@+id/crop_view\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    app:cropme_background_alpha=\"80%\"\n    app:cropme_frame_height_percent=\"80%\"\n    app:cropme_frame_width_percent=\"80%\"\n    app:cropme_max_scale=\"2.0\"\n    app:cropme_overlay_shape=\"rectangle\"\n    app:cropme_with_border=\"true\"\n    \u003e\n```\n\n\u003cbr/\u003e\n\n### Set your image\n\n```kt\ncropView.setUri(uri);\n// or\ncropView.setBitmap(bitmap)\n```\n\n### Crop it!\n\n```kt\ncropLayout.addOnCropListener(object : OnCropListener {\n  override fun onSuccess(bitmap: Bitmap) {\n    // do somethhing with bitmap.\n  }\n\n  override fun onFailure(e: Exception) {\n    // do error handling.\n  }\n})\n    \ncropView.isOffFrame() // optionally check if the image is off the frame.\n\ncropView.crop() // crop image\n```\n\n\u003cbr/\u003e\n\n## Attributes\n\n| attribute | description | default |\n|:---|:---|:---|\n| cropme_frame_width_percent | width of croppling frame | 80% |\n| cropme_frame_height_percent | height of croppling frame | 80% |\n| cropme_max_scale | maximum scale while cropping  | 2.0 |\n| cropme_with_border | if borders are shown while cropping | true |\n| cropme_background_alpha | background alpha out side of cropping area | 80% |\n| cropme_overlay_shape | shape of croppling frame | rectangle / circle / custom |\n| cropme_custom_shape_layout | custom layout for custom shape | @layout/custom_layout |\n\n\u003cbr/\u003e\n\n## Custom Overlay\n\nIf you want to show a custom overlay, you can customize the Overlay by extending CropOverlay.\n\nYou can see more detail in [app](https://github.com/TakuSemba/CropMe/tree/master/app) module.\n\n```java\nclass CustomCropOverlay @JvmOverloads constructor(\n    context: Context,\n    attrs: AttributeSet? = null,\n    defStyleAttr: Int = 0,\n    cropOverlayAttrs: AttributeSet? = attrs\n) : CropOverlay(context, attrs, defStyleAttr, cropOverlayAttrs) {\n\n  override fun drawBackground(canvas: Canvas, paint: Paint) {\n    // draw background\n  }\n\n  override fun drawCrop(canvas: Canvas, paint: Paint) {\n    // draw croppling frame\n  }\n\n  override fun drawBorder(canvas: Canvas, paint: Paint) {\n    // draw borders\n  }\n}\n```\n\n## Sample\nClone this repo and check out the [app](https://github.com/TakuSemba/CropMe/tree/master/app) module.\n\n## Author\n\n* **Taku Semba**\n    * **Github** - (https://github.com/takusemba)\n    * **Twitter** - (https://twitter.com/takusemba)\n    * **Facebook** - (https://www.facebook.com/takusemba)\n\n## Licence\n```\nCopyright 2017 Taku Semba.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakusemba%2Fcropme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftakusemba%2Fcropme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakusemba%2Fcropme/lists"}