[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-4063":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":16,"starSnapshotCount":16,"syncStatus":34,"lastSyncTime":35,"discoverSource":36},4063,"uCrop","Yalantis\u002FuCrop","Yalantis","Image Cropping Library for Android","https:\u002F\u002Fyalantis.com\u002Fblog\u002Fintroducing-ucrop-our-own-image-cropping-library-for-android\u002F",null,"Java",12089,2225,253,320,0,8,67.8,false,"develop",true,[23,24,25,26,27,28,29,30],"android","animation","crop","image","java","photo","rotation","scale","2026-06-12 04:00:21","# uCrop - Image Cropping Library for Android\n\n#### This project aims to provide an ultimate and flexible image cropping experience. Made in [Yalantis](https:\u002F\u002Fyalantis.com\u002F?utm_source=github)\n\n#### [How We Created uCrop](https:\u002F\u002Fyalantis.com\u002Fblog\u002Fhow-we-created-ucrop-our-own-image-cropping-library-for-android\u002F)\n#### Check this [project on Dribbble](https:\u002F\u002Fdribbble.com\u002Fshots\u002F2484752-uCrop-Image-Cropping-Library)\n\n\u003Cimg src=\"preview.gif\" width=\"800\" height=\"600\">\n\n# Usage\n\n*For a working implementation, please have a look at the Sample Project - sample*\n\n\u003Ca href=\"https:\u002F\u002Fplay.google.com\u002Fstore\u002Fapps\u002Fdetails?id=com.yalantis.ucrop.sample&utm_source=global_co&utm_medium=prtnr&utm_content=Mar2515&utm_campaign=PartBadge&pcampaignid=MKT-AC-global-none-all-co-pr-py-PartBadges-Oct1515-1\">\u003Cimg alt=\"Get it on Google Play\" src=\"https:\u002F\u002Fplay.google.com\u002Fintl\u002Fen_us\u002Fbadges\u002Fimages\u002Fgeneric\u002Fen_badge_web_generic.png\" width=\"185\" height=\"70\"\u002F>\u003C\u002Fa>\n\n1. Include the library as a local library project.\n\n\t```\n\tallprojects {\n\t   repositories {\n\t      maven { url \"https:\u002F\u002Fjitpack.io\" }\n\t   }\n\t}\n\t```\n\n    ``` implementation 'com.github.yalantis:ucrop:2.2.11' ``` - lightweight general solution\n\n    ``` implementation 'com.github.yalantis:ucrop:2.2.11-native' ``` - get power of the native code to preserve image quality (+ about 1.5 MB to an apk size)\n\n2. Add UCropActivity into your AndroidManifest.xml\n\n    ```\n    \u003Cactivity\n        android:name=\"com.yalantis.ucrop.UCropActivity\"\n        android:screenOrientation=\"portrait\"\n        android:theme=\"@style\u002FTheme.AppCompat.Light.NoActionBar\"\u002F>\n    ```\n\n3. Register a callback for the uCrop result.\n\n    ```java\n    private ActivityResultLauncher\u003CIntent> activityResultLauncher =\n            registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), result -> {\n                if (result.getResultCode() == RESULT_OK) {\n                    final Uri resultUri = UCrop.getOutput(result.getData());\n                } else if (result.getResultCode() == UCrop.RESULT_ERROR) {\n                    final Throwable cropError = UCrop.getError(result.getData());\n                }\n            });\n    ```\n\n4. Create the uCrop configuration using the builder pattern.\n\n   ```java\n   UCrop.of(sourceUri, destinationUri)\n       .withAspectRatio(16, 9)\n       .withMaxResultSize(maxWidth, maxHeight)\n       .start(context, activityResultLauncher);\n   ```\n\n5. You may want to add this to your PROGUARD config:\n\n    ```\n    -dontwarn com.yalantis.ucrop**\n    -keep class com.yalantis.ucrop** { *; }\n    -keep interface com.yalantis.ucrop** { *; }\n    ```\n\n# Customization\n\nIf you want to let your users choose crop ratio dynamically, just do not call `withAspectRatio(x, y)`.\n\nuCrop builder class has method `withOptions(UCrop.Options options)` which extends library configurations.\n\nCurrently, you can change:\n\n   * image compression format (e.g. PNG, JPEG), compression\n   * image compression quality [0 - 100]. PNG which is lossless, will ignore the quality setting.\n   * whether all gestures are enabled simultaneously\n   * maximum size for Bitmap that is decoded from source Uri and used within crop view. If you want to override the default behaviour.\n   * toggle whether to show crop frame\u002Fguidelines\n   * setup color\u002Fwidth\u002Fcount of crop frame\u002Frows\u002Fcolumns\n   * choose whether you want rectangle or oval(`options.setCircleDimmedLayer(true)`) crop area\n   * the UI colors (Toolbar, StatusBar, active widget state)\n   * and more...\n\n# Compatibility\n\n  * Library - Android Lollipop 5.0+ (API 21) (Android ICS 4.0+ (API 14) for versions \u003C 2.2.11)\n  * Sample - Android Lollipop 5.0+ (API 21)\n  * CPU - armeabi-v7a x86 x86_64 arm64-v8a (for versions >= 2.2.11)\n\n# Changelog\n\n### Version: 2.2.11\n\n*   Updated compileSdk and targetSdk to 36\n*   Added support for 16 KB page sizes\n*   Enabled edge-to-edge UI support\n*   And other improvements\n\n### Version: 2.2.10\n\n*   Fixed [#926](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F926)\n\n### Version: 2.2.9\n\n*   Update compileSdk and targetSdk versions up to 33\n*   Fixed [#867](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F867)\n*   Fixed [#873](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F873)\n*   And other improvements\n\n### Version: 2.2.8\n\n*   Merged pending pull requests with improvements and bugfixes\n*   Update compileSdk and targetSdk versions up to 31\n*   Add localizations\n*   Fixed [#609](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F609)\n*   Fixed [#794](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F794)\n\n### Version: 2.2.5\n\n*   Fixed [#584](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F584)\n*   Fixed [#598](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F598)\n*   Fixed [#543](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F543)\n*   Fixed [#602](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F602)\n*   And other improvements\n\n### Version: 2.2.4\n\n  * **AndroidX migration**\n  * Redesign\n  * Several fixes including [#550](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F550)\n\n### Version: 2.2.3\n\n  * Several fixes including [#445](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F445), [#465](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F465) and more!\n  * Material design support\n  * uCrop fragment as child fragment\n  * Added the Italian language\n\n### Version: 2.2.2\n\n  * uCrop fragment added\n  * bugfix\n\n### Version: 2.2.1\n\n  * Fix including [#285](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F285)\n\n### Version: 2.2\n\n  * Several fixes including [#121](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F121), [#173](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F173), [#184](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F184) and more!\n  * New APIs introduced [#149](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F149), [#186](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F186) and [#156](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F156)\n\n### Version: 2.1\n\n  * Fixes issue with EXIF data (images taken on front camera with Samsung devices mostly) [#130](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F130) [#111](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F111)\n  * Added API to set custom set of aspect ratio options for the user. [#131](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F131)\n  * Added API to set all configs via UCrop.Options class. [#126](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F126)\n  * Added ABI x86_64 support. [#105](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F105)\n\n### Version: 2.0\n\n  * Native image crop (able to crop high-resolution images, e.g. 16MP & 32MP images on Nexus 5X).\n  * WebP compression format is not supported at the moment (choose JPEG or PNG).\n  * Now library copies EXIF data to cropped image (size and orientation are updated).\n\n### Version: 1.5\n\n  * Introduced \"Freestyle\" crop (you can resize crop rectangle by dragging it corners) [#32](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F32)\n  * Now image & crop view paddings are not associated [#68](https:\u002F\u002Fgithub.com\u002FYalantis\u002FuCrop\u002Fissues\u002F68)\n  * Updated API\n\n### Version: 1.4\n\n  * Introduced HTTP(s) Uri support!\n  * Image is cropped in a background thread.\n  * Showing loader while Bitmap is processed (both loading and cropping).\n  * Several bug fixes.\n  * Couple new things to configure.\n  * Updated minSdkVersion to Android ICS 4.0 (no reason to support couple percents of old phones).\n\n### Version: 1.3\n\n  * Image is loaded in a background thread. Better error-handling for image decoding.\n  * Improved EXIF data support (rotation and mirror).\n  * Small UI updates.\n  * Couple new things to configure.\n\n  * Sample updated with the possibility to choose custom aspect ratio.\n\n### Version: 1.2\n\n  * Updated core logic so an image corrects its position smoothly and obviously.\n\n### Version: 1.1\n\n  * UCrop builder was updated and now UCrop.Options class has even more values to setup.\n\n### Version: 1.0\n\n  * Initial Build\n\n### Let us know!\n\nWe’d be really happy if you sent us links to your projects where you use our component. Just send an email to github@yalantis.com And do let us know if you have any questions or suggestion regarding the library.\n\n#### Apps using uCrop\n\n- [Thirty](https:\u002F\u002Fplay.google.com\u002Fstore\u002Fapps\u002Fdetails?id=com.twominds.thirty).\n- [Light Smart HD](https:\u002F\u002Fplay.google.com\u002Fstore\u002Fapps\u002Fdetails?id=com.SmartCamera.simple).\n- [BCReader](https:\u002F\u002Fplay.google.com\u002Fstore\u002Fapps\u002Fdetails?id=com.iac.bcreader).\n- [Xprezia: Share Your Passion](https:\u002F\u002Fplay.google.com\u002Fstore\u002Fapps\u002Fdetails?id=com.xprezzia.cnj).\n\n## License\n\n    Copyright 2017, Yalantis\n\n    Software doesn't collect, store or transfer data to Yalantis or third parties.\n    Emplacement of this Software is carried out locally at device.\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:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-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","uCrop 是一个为 Android 平台设计的图像裁剪库。它支持多种核心功能，包括自定义裁剪比例、最大结果尺寸设置以及图片旋转和缩放等，并且通过原生代码优化来保持图像质量。该库使用 Java 语言编写，提供了一个轻量级但功能全面的解决方案，适用于需要在应用中集成高级图像裁剪功能的各种场景，如社交媒体应用中的个人资料图片编辑或在线购物平台的商品图片处理。此外，uCrop 还允许开发者根据需求调整配置选项以满足特定的应用需求。",2,"2026-06-11 02:58:14","top_language"]