{"id":13390523,"url":"https://github.com/cesards/SuperImageView","last_synced_at":"2025-03-13T15:32:04.038Z","repository":{"id":22779691,"uuid":"26125768","full_name":"cesards/SuperImageView","owner":"cesards","description":"Crop and Rounded Corners added to an ImageView. ","archived":false,"fork":false,"pushed_at":"2019-02-20T09:36:26.000Z","size":14563,"stargazers_count":652,"open_issues_count":14,"forks_count":112,"subscribers_count":29,"default_branch":"master","last_synced_at":"2024-07-30T14:17:44.555Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"shaun-edwards/moveit_simple","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cesards.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-03T15:46:43.000Z","updated_at":"2024-07-30T14:17:44.556Z","dependencies_parsed_at":"2022-08-21T12:30:51.620Z","dependency_job_id":null,"html_url":"https://github.com/cesards/SuperImageView","commit_stats":null,"previous_names":["cesards/cropimageview"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesards%2FSuperImageView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesards%2FSuperImageView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesards%2FSuperImageView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesards%2FSuperImageView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cesards","download_url":"https://codeload.github.com/cesards/SuperImageView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221380075,"owners_count":16809014,"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":[],"created_at":"2024-07-30T14:01:07.705Z","updated_at":"2024-10-25T03:30:40.976Z","avatar_url":"https://github.com/cesards.png","language":"Java","readme":"\u003ch1 align=\"center\"\u003eSuperImageView\u003c/h1\u003e\n\u003cp align=\"center\"\u003eExtra features for your ImageView provided in a modularized way\u003c/p\u003e\n\n\n\u003ch1 align=\"center\"\u003eDocumentation for v2 coming this week.\u003c/h1\u003e\n\n---\n---\n---\n\n\n\u003ch1 align=\"center\"\u003eCropImageView\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://developer.android.com/index.html\"\u003e\u003cimg src=\"https://img.shields.io/badge/platform-android-green.svg?style=flat-square\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://android-arsenal.com/api?level=7\"\u003e\u003cimg src=\"https://img.shields.io/badge/API-7%2B-brightgreen.svg?style=flat-square\"\u003e\u003c/a\u003e\n  \u003ca href=\"http://android-arsenal.com/details/1/1546\"\u003e\u003cimg src=\"https://img.shields.io/badge/Android%20Arsenal-CropImageView-blue.svg?style=flat-square\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://circleci.com/gh/cesards/CropImageView\"\u003e\u003cimg src=\"https://img.shields.io/circleci/project/BrightFlair/PHP.Gt/master.svg?style=flat-square\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/cesards/CropImageView/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nAn ImageView that supports different kind of cropping rather than the only Android is currently supporting: `centerCrop`\n\nUsing this library, you can crop your desired image by sides described below:\n\n![Crop options](https://github.com/cesards/CropImageView/blob/master/art/cropping.png)\n\nDevelopment idea borns at the point in [Kerad Games] we needed images cropped by somewhere no matter the image size.\n\nThe original images we had to deal with (we wanted the half size of the ball shown whatever screen size), below\n\n![Menu Left Side](https://github.com/cesards/CropImageView/blob/master/art/slide_menu_left.jpg)\n![Menu Right Side](https://github.com/cesards/CropImageView/blob/master/art/slide_menu_right.jpg)\n\nHere are some screenshots what we got thanks to this widget :-)\n\n![Menu Post Left Side](https://github.com/cesards/CropImageView/blob/master/art/crop_menu_1.png)\n![Menu Post Right Side](https://github.com/cesards/CropImageView/blob/master/art/crop_menu_2.png)\n![Menu Centered](https://github.com/cesards/CropImageView/blob/master/art/crop_menu_3.png)\n\nUsage\n-----\n### Step 1\n##### Gradle\n```groovy\ndependencies {\n   compile 'com.cesards.android:cropimageview:1.0.2.1'\n}\n```\n##### Maven\n```xml\n\u003cdependency\u003e\n   \u003cgroupId\u003ecom.cesards.android\u003c/groupId\u003e\n   \u003cartifactId\u003eCropImageView\u003c/artifactId\u003e\n   \u003cversion\u003e1.0.2\u003c/version\u003e\n   \u003ctype\u003eaar\u003c/type\u003e\n\u003c/dependency\u003e\n```\n### Step 2\nDefine in xml:\n```xml\n\u003ccom.codeforvictory.android.superimageview.SuperImageView\n   xmlns:custom=\"http://schemas.android.com/apk/res-auto\"\n   android:id=\"@+id/imageView1\"\n   android:src=\"@drawable/photo1\"\n   custom:crop=\"value\" /\u003e\n```\nwhere `value` can take values\n```xml\ntopLeft|centerLeft|bottomLeft|topRight|centerRight|bottomRight|centerTop|centerBottom\n```\nOr in code:\n```java\nfinal CropImageView cropImageView = new CropImageView(CropActivity.this);\nfinal Resources res = getResources();\ncropImageView.setImageDrawable(res.getDrawable(images[position]));\nfinal CropImageView.CropType cropType = imageCrops[position];\ncropImageView.setCropType(cropType);\n```\nPerformance tests (using [Hugo](https://github.com/jakeWharton/hugo))\n---------\n\n### Center Crop Sample (ImageView)\n```\nV/TestForegroundImageView﹕ ⇢ setFrame(l=0, t=0, r=1080, b=1557)\nV/TestForegroundImageView﹕ ⇠ setFrame [0ms] = true\nV/TestForegroundImageView﹕ ⇢ setFrame(l=1080, t=0, r=2160, b=1557)\nV/TestForegroundImageView﹕ ⇠ setFrame [0ms] = true\nV/TestForegroundImageView﹕ ⇢ setFrame(l=0, t=0, r=1080, b=1557)\nV/TestForegroundImageView﹕ ⇠ setFrame [0ms] = false\nV/TestForegroundImageView﹕ ⇢ setFrame(l=1080, t=0, r=2160, b=1557)\nV/TestForegroundImageView﹕ ⇠ setFrame [0ms] = false\nV/TestForegroundImageView﹕ ⇢ setFrame(l=0, t=0, r=1080, b=1701)\nV/TestForegroundImageView﹕ ⇠ setFrame [0ms] = true\nV/TestForegroundImageView﹕ ⇢ setFrame(l=1080, t=0, r=2160, b=1701)\nV/TestForegroundImageView﹕ ⇠ setFrame [0ms] = true`\n```\n\n### Custom Crop Sample (CropImageView)\n```\nV/TestForegroundCropImageView﹕ ⇢ setFrame(l=0, t=0, r=1080, b=1557)\nV/TestForegroundCropImageView﹕ ⇠ setFrame [0ms] = true\nV/TestForegroundCropImageView﹕ ⇢ setFrame(l=1080, t=0, r=2160, b=1557)\nV/TestForegroundCropImageView﹕ ⇠ setFrame [0ms] = true\nV/TestForegroundCropImageView﹕ ⇢ setFrame(l=0, t=0, r=1080, b=1557)\nV/TestForegroundCropImageView﹕ ⇠ setFrame [0ms] = false\nV/TestForegroundCropImageView﹕ ⇢ setFrame(l=1080, t=0, r=2160, b=1557)\nV/TestForegroundCropImageView﹕ ⇠ setFrame [0ms] = false\nV/TestForegroundCropImageView﹕ ⇢ setFrame(l=0, t=0, r=1080, b=1701)\nV/TestForegroundCropImageView﹕ ⇠ setFrame [0ms] = true\nV/TestForegroundCropImageView﹕ ⇢ setFrame(l=1080, t=0, r=2160, b=1701)\nV/TestForegroundCropImageView﹕ ⇠ setFrame [0ms] = true\n```\nResults: code used does not cause overhead in the UI thread.\n\nChangeLog\n---------\n* __1.0.2.1 (2015-10-22)__\n   * ImageView crashes in devices with API \u003c 18 due to a `@TargetApi` annotation\n* __1.0.2 (2015-10-22)__\n  * Changed `minSdkVersion` to 7\n  * Solved a bug related with ImageView and API \u003c 18.\n* __1.0.1 (2015-02-17)__\n  * Changed Samples UI and removed unused resources.\n  * Added performance tests to Samples.\n  * Added code styles for contributions.\n  * Improved CropImageView widget. Removed `onLayout()` overhead. `ImageView` `onLayout()` is empty, so we only need logic in `setFrame()` method.\n* __1.0.0 (2015-02-15)__\n  * Initial release. (`minSdkVersion=\"14\"`).\n\nDeveloped By\n------------\n* César Díez Sánchez - \u003ccesaryomismo@gmail.com\u003e\n\n\u003ca href=\"https://twitter.com/menorking\"\u003e\n  \u003cimg alt=\"Follow me on Twitter\" src=\"http://i.imgur.com/FMPxu5z.png\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://plus.google.com/115273462230054581675\"\u003e\n  \u003cimg alt=\"Follow me on Google Plus\" src=\"http://i.imgur.com/KUyF398.png\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://medium.com/@cesards\"\u003e\n  \u003cimg alt=\"Follow me on Medium\" src=\"http://i.imgur.com/oStZly8.png\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://www.pinterest.com/menorking/\"\u003e\n  \u003cimg alt=\"Follow me on Pinterest\" src=\"http://i.imgur.com/ByWvWfX.png\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://dribbble.com/cesards\"\u003e\n  \u003cimg alt=\"Follow me on Dribbble\" src=\"http://i.imgur.com/zWa8Fx3.png\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"http://www.linkedin.com/in/cesardiezsanchez\"\u003e\n  \u003cimg alt=\"Add me to Linkedin\" src=\"http://i.imgur.com/GR52IsJ.png\" /\u003e\n\u003c/a\u003e\n\nWho's using it\n--------------\n* [Golden Manager](https://play.google.com/store/apps/details?id=com.keradgames.goldenmanager)\n* [Slipstream Music](https://play.google.com/store/apps/details?id=com.cypher.slipstream\u0026hl=en)\n* [Vueling](https://play.google.com/store/apps/details?id=com.mo2o.vueling)\n* Does your app use CropImageView? Let me know if you want to be featured in this list :-)\n\nDo you want to contribute?\n--------------------------\nI'm pretty sure you there are some awesome hidden features you need in your daily dev life. Just let me know or collaborate to improve this librar\n\nI'd like to improve this library with your help, there are some new features to implement waiting for you ;)\n\nIf you want to contribute, you should use [my code styles](https://github.com/cesards/CropImageView/blob/master/codestyles_DogmaLabs.xml) available in the root of the project!\n\n\u003cbr\u003e\n\n\u003ch2 align=\"center\"\u003eLicense\u003c/h1\u003e\n\n__The MIT License (MIT)__\n\nCopyright (c) 2016 César Díez Sánchez\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","funding_links":[],"categories":["Index `(light-weight pages)`","图片","Index"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcesards%2FSuperImageView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcesards%2FSuperImageView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcesards%2FSuperImageView/lists"}