{"id":13516448,"url":"https://github.com/line/clay","last_synced_at":"2025-10-18T01:35:26.468Z","repository":{"id":66087595,"uuid":"103488794","full_name":"line/clay","owner":"line","description":"Clay is an Android library project that provides image trimming which is originally an UI component of LINE Creators Studio","archived":false,"fork":false,"pushed_at":"2023-04-06T06:37:45.000Z","size":2447,"stargazers_count":122,"open_issues_count":3,"forks_count":21,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-06-08T08:07:38.763Z","etag":null,"topics":["android","android-library","kotlin"],"latest_commit_sha":null,"homepage":"","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/line.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","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-14T05:15:25.000Z","updated_at":"2025-06-07T11:02:28.000Z","dependencies_parsed_at":"2024-11-01T21:30:52.095Z","dependency_job_id":"34473a69-a05f-42a6-9aec-047c6912c1df","html_url":"https://github.com/line/clay","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/line/clay","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2Fclay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2Fclay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2Fclay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2Fclay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/line","download_url":"https://codeload.github.com/line/clay/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2Fclay/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260672771,"owners_count":23044861,"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","kotlin"],"created_at":"2024-08-01T05:01:22.362Z","updated_at":"2025-10-18T01:35:26.463Z","avatar_url":"https://github.com/line.png","language":"Kotlin","funding_links":[],"categories":["Libraries","开源库"],"sub_categories":["Android","图片"],"readme":"# Clay\n[![API](https://img.shields.io/badge/API-16%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=16) ![build-status](https://travis-ci.org/line/clay.svg?branch=master)\n\nClay is an Android library project that provides image trimming. Fully written in Kotlin, Clay is originally a UI component of [LINE Creators Studio](https://creator.line.me/en/studio/), a LINE app for creating LINE stickers. You can use Clay with any Android application to trim the outline of an image and create your own custom shape.\n\n* Produce a trimmed image\n* Zoom in/out an image\n* Undo previous trimming actions\n\n![](https://github.com/line/clay/blob/master/screenshot/screenshot.png)\n\nClick [here](https://github.com/line/clay/blob/master/screenshot/example.gif) to see how you can trim an image into a random shape.\n\n## How to build\n\nUse Gradle to build the library. Download it from [JCenter](https://bintray.com/bintray/jcenter) and add configurations in the build.gradle file as follows.\n\n```gradle\nallprojects {\n    repositories {\n        jcenter()\n    }\n}\n\ndependencies {\n  implementation \"com.linecorp:clayview:0.1.2\"\n}\n```\n\n## Getting started\n\nTo get started with Clay, define its view in an XML layout file as follows.\n\n```gradle\n  \u003ccom.linecorp.clay.view.ClayView\n    android:id=\"@+id/clay\"\n    android:src=\"@drawable/test2\"\n    app:strokeWidth=\"6dp\"\n    app:endPointRadius=\"20dp\"\n    app:controlPointColor=\"@android:color/holo_red_dark\"\n    app:strokeColor=\"@color/orange_ffcc80\" /\u003e\n```\n\nThen you can use ClayView as follows.\n\n```java\nval clayView = findViewById(R.id.clay) as ClayView\n\nclayView.undoSelect() // undo\nclayView.getCroppedImage() // get the cropped image\n```\n\nYou can find a more advanced way of using the library from the [example](https://github.com/line/clay/tree/master/app).\n\n## How to contribute to Clay\n\nSee [CONTRIBUTE.md](https://github.com/line/clay/blob/master/CONTRIBUTING.md)\n\n## License\n\n```\nCopyright 2017 LINE Corporation\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%2Fline%2Fclay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fline%2Fclay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fline%2Fclay/lists"}