{"id":16426832,"url":"https://github.com/wasabeef/transformers","last_synced_at":"2025-04-06T08:14:48.411Z","repository":{"id":38800936,"uuid":"217567762","full_name":"wasabeef/transformers","owner":"wasabeef","description":"An Android transformation library providing a variety of image transformations for Coil, Glide, Picasso, and Fresco.","archived":false,"fork":false,"pushed_at":"2022-03-11T10:50:21.000Z","size":52461,"stargazers_count":307,"open_issues_count":6,"forks_count":19,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-30T07:09:06.433Z","etag":null,"topics":["android","coil","fresco","glide","gpuimage","image-processing","picasso","transformation"],"latest_commit_sha":null,"homepage":"https://github.com/wasabeef/transformers","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/wasabeef.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"wasabeef","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-10-25T15:53:40.000Z","updated_at":"2025-03-26T09:59:13.000Z","dependencies_parsed_at":"2022-07-14T22:17:00.633Z","dependency_job_id":null,"html_url":"https://github.com/wasabeef/transformers","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasabeef%2Ftransformers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasabeef%2Ftransformers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasabeef%2Ftransformers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasabeef%2Ftransformers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wasabeef","download_url":"https://codeload.github.com/wasabeef/transformers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247451667,"owners_count":20940944,"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","coil","fresco","glide","gpuimage","image-processing","picasso","transformation"],"created_at":"2024-10-11T08:10:35.247Z","updated_at":"2025-04-06T08:14:48.385Z","avatar_url":"https://github.com/wasabeef.png","language":"Kotlin","readme":"\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/logo.jpg\" width=\"640px\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.apache.org/licenses/LICENSE-2.0\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/license-Apache%202-blue.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://search.maven.org/search?q=jp.wasabeef.transformers\"\u003e\n    \u003cimg src=\"https://maven-badges.herokuapp.com/maven-central/jp.wasabeef.transformers/core/badge.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/wasabeef/transformers/actions\"\u003e\n    \u003cimg src=\"https://github.com/wasabeef/transformers/workflows/Android%20CI/badge.svg\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## What is Transformers?\n\nAn Android transformation library providing a variety of image transformations for [Coil], [Glide], [Picasso], and [Fresco].\n\n\u003ca href=\"https://github.com/coil-kt/coil\"\u003e\n  \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/coil.png\" width=\"58px\"/\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/bumptech/glide\"\u003e\n  \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/glide.png\" width=\"64px\"/\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/square/picasso\"\u003e\n  \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/picasso.jpg\" width=\"64px\"/\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/facebook/fresco\"\u003e\n  \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/fresco.png\" width=\"64px\"/\u003e\n\u003c/a\u003e\n\u003ca href=\"https://developer.android.com/jetpack/compose\"\u003e\n  \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/jetpack-compose.svg\" width=\"100px\"/\u003e\n\u003c/a\u003e\n\n\u003cbr\u003e\n\n### Part of the sample\n\u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/Original.png\" width=\"120px\" /\u003e \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/Mask.png\" width=\"120px\" /\u003e \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/CropCircle.png\" width=\"120px\" /\u003e \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/RSGaussianBlurDeep.png\" width=\"120px\" /\u003e \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/RoundedCornersTopLeft.png\" width=\"120px\" /\u003e\n\n\u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/PixelDeep.png\" width=\"120px\" /\u003e \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/ZoomBlur.png\" width=\"120px\" /\u003e \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/Kuawahara.png\" width=\"120px\" /\u003e \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/Vignette.png\" width=\"120px\" /\u003e \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/ToneCurve.png\" width=\"120px\" /\u003e\n\n\u003cbr\u003e\n\n\u003e [Glide Transformations](https://github.com/wasabeef/glide-transformations), [Picasso Transformations](https://github.com/wasabeef/picasso-transformations), [Fresco Processors](https://github.com/wasabeef/fresco-processors) are deprecated.   \n\u003e Development will stop soon.. For an up-to-date version, please use this.\n\n\n## Installation\n\n### Requirements\n- Android 5.0+ Lollipop (API level 21)\n\n### Gradle settings\n```gradle\nrepositories {\n  mavenCentral()\n}\n```\n\n**This Transformer is NOT using [android.support.v8.rendererscript](https://developer.android.com/guide/topics/renderscript/compute#ide-setup) because `librs.so` make the APK file too big.**\n\n#### For [Coil] \u003ca href=\"https://github.com/coil-kt/coil\"\u003e\u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/coil.png\" width=\"12px\"/\u003e\u003c/a\u003e\n```gradle\ndependencies {\n  implementation 'jp.wasabeef.transformers:coil:1.0.6'\n  // Use the GPU Filters \n  implementation 'jp.wasabeef.transformers:coil-gpu:1.0.6'\n}\n```\n```kotlin\nimageView.load(IMAGE_URL) {\n  transformations(\n    CropCenterTransformation(),\n    RoundedCornersTransformation(radius = 120, cornerType = CornerType.DIAGONAL_FROM_TOP_LEFT)\n  )\n}\n```\n\n#### For [Glide] \u003ca href=\"https://github.com/bumptech/glide\"\u003e\u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/glide.png\" width=\"12px\"/\u003e\u003c/a\u003e\n```gradle\ndependencies {\n  implementation 'jp.wasabeef.transformers:glide:1.0.6'\n  // Use the GPU Filters \n  implementation 'jp.wasabeef.transformers:glide-gpu:1.0.6'\n}\n```\n```kotlin\nGlide.with(context)\n  .load(IMAGE_URL)\n  .apply(\n    bitmapTransform(\n      MultiTransformation(\n        CropCenterTransformation(),\n        BlurTransformation(context, 15, sampling = 1)\n      )\n    )\n  ).into(imageView)\n```\n\n#### For [Picasso] \u003ca href=\"https://github.com/square/picasso\"\u003e\u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/picasso.jpg\" width=\"12px\"/\u003e\u003c/a\u003e\n```gradle\ndependencies {\n  implementation 'jp.wasabeef.transformers:picasso:1.0.6'\n  // Use the GPU Filters \n  implementation 'jp.wasabeef.transformers:picasso-gpu:1.0.6'\n}\n```\n```kotlin\nPicasso.get()\n  .load(IMAGE_URL)\n  .fit().centerInside()\n  .transform(\n    mutableListOf(\n      CropCenterTransformation(),\n      BlurTransformation(context, 25, sampling = 4)\n    )\n  ).into(imageView)\n```\n\n#### For [Fresco] \u003ca href=\"https://github.com/facebook/fresco\"\u003e\u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/fresco.png\" width=\"12px\"/\u003e\u003c/a\u003e\n```gradle\ndependencies {\n  implementation 'jp.wasabeef.transformers:fresco:1.0.6'\n  // Use the GPU Filters \n  implementation 'jp.wasabeef.transformers:fresco-gpu:1.0.6'\n}\n```\n```kotlin\nval request: ImageRequest =\n  ImageRequestBuilder.newBuilderWithSource(IMAGE_URL.toUri())\n  .setPostprocessor(BlurPostprocessor(context, 25, 4))\n  .build()\n\nholder.image.controller = Fresco.newDraweeControllerBuilder()\n  .setImageRequest(request)\n  .setOldController(draweeView.controller)\n  .build()\n```\n\n### With Jetpack Compose\n\nUse [Composable Images](https://github.com/wasabeef/composable-images) when using with Jetpack Compose.\n\n```kotlin\nGlideImage(\n  model = IMAGE_URL,\n  modifier = Modifier.preferredWidth(120.dp),\n  options = RequestOptions().transform(\n    BlurTransformation(context, radius = 25, sampling = 4)\n  )\n)\n```\n\n### Sample transformations\n| Original | Mask | NinePatchMask | CropTop |\n|:---:|:---:|:---:|:---:|\n| \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/Original.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/Mask.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/NinePatchMask.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/CropTop.png\" width=\"120px\" /\u003e |\n| CropCenter | CropBottom | CropCenterRatio16x9 | CropCenterRatio4x3 |\n| \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/CropCenter.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/CropBottom.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/CropCenterRatio16x9.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/CropCenterRatio4x3.png\" width=\"120px\" /\u003e |\n| CropTopRatio16x9 | CropBottomRatio4x3 | CropSquare | CropCircle |\n| \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/CropTopRatio16x9.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/CropBottomRatio4x3.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/CropSquare.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/CropCircle.png\" width=\"120px\" /\u003e |\n| CropCircleWithBorder | ColorFilter | Grayscale | RoundedCorners |\n| \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/CropCircleWithBorder.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/ColorFilter.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/Grayscale.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/RoundedCorners.png\" width=\"120px\" /\u003e |\n| RoundedCornersTopLeft | RSGaussianBlurLight | RSGaussianBlurDeep | StackBlurLight |\n| \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/RoundedCornersTopLeft.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/RSGaussianBlurLight.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/RSGaussianBlurDeep.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/StackBlurLight.png\" width=\"120px\" /\u003e |\n| StackBlurDeep | \n| \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/StackBlurDeep.png\" width=\"120px\" /\u003e | \n\n\u003ckbd\u003ecoil\u003c/kbd\u003e, \u003ckbd\u003eglide\u003c/kbd\u003e, \u003ckbd\u003epicasso\u003c/kbd\u003e\n- BlurTransformation\n- ColorFilterTransformation\n- CropCenterBottomTransformation\n- CropCenterTopTransformation\n- CropCenterTransformation\n- CropCircleTransformation\n- CropCircleWithBorderTransformation\n- CropSquareTransformation\n- CropTransformation\n- GrayscaleTransformation\n- MaskTransformation\n- RoundedCornersTransformation\n\n\u003ckbd\u003efresco\u003c/kbd\u003e\n- BlurPostprocessor\n- ColorFilterPostprocessor\n- CombinePostProcessors\n- GrayscalePostprocessor\n- MaskPostprocessor\n\n\n### Sample transformations with [GPUImage](https://github.com/cats-oss/android-gpuimage)\n\nWe recommend that you have a ToneCurve file, as you can apply any filters you like.\n\n| Original | Sepia | Contrast | Invert |\n|:---:|:---:|:---:|:---:|\n| \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/Original.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/Sepia.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/Contrast.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/Invert.png\" width=\"120px\" /\u003e |\n| PixelLight | PixelDeep | Sketch | Swirl |\n| \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/PixelLight.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/PixelDeep.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/Sketch.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/Swirl.png\" width=\"120px\" /\u003e |\n| Brightness | Kuawahara | Vignette | ZoomBlur |\n| \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/Brightness.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/Kuawahara.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/Vignette.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/ZoomBlur.png\" width=\"120px\" /\u003e |\n| WhiteBalance | Halftone | Sharpness | Toon |\n| \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/WhiteBalance.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/Halftone.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/Sharpness.png\" width=\"120px\" /\u003e | \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/Toon.png\" width=\"120px\" /\u003e |\n| ToneCurve | \n| \u003cimg src=\"https://github.com/wasabeef/transformers/raw/main/art/ToneCurve.png\" width=\"120px\" /\u003e | \n\n\u003ckbd\u003ecoil-gpu\u003c/kbd\u003e, \u003ckbd\u003eglide-gpu\u003c/kbd\u003e, \u003ckbd\u003epicasso-gpu\u003c/kbd\u003e\n- BrightnessFilterTransformation\n- ContrastFilterTransformation\n- HalftoneFilterTransformation\n- InvertFilterTransformation\n- KuwaharaFilterTransformation\n- PixelationFilterTransformation\n- SepiaFilterTransformation\n- SharpenFilterTransformation\n- SketchFilterTransformation\n- SwirlFilterTransformation\n- ToneCurveFilterTransformation\n- ToonFilterTransformation\n- VignetteFilterTransformation\n- WhiteBalanceFilterTransformation\n- ZoomBlurFilterTransformation\n\n\u003ckbd\u003efresco-gpu\u003c/kbd\u003e\n- BrightnessFilterPostprocessor\n- ContrastFilterPostprocessor\n- HalftoneFilterPostprocessor\n- InvertFilterPostprocessor\n- KuwaharaFilterPostprocessor\n- PixelationFilterPostprocessor\n- SepiaFilterPostprocessor\n- SharpenFilterPostprocessor\n- SketchFilterPostprocessor\n- SwirlFilterPostprocessor\n- ToneCurveFilterPostprocessor\n- ToonFilterPostprocessor\n- VignetteFilterPostprocessor\n- WhiteBalanceFilterPostprocessor\n- ZoomBlurFilterPostprocessor\n\n## Development\n\n### Setup \n\nThings you will need\n\n- Linux, Mac OS X, or Windows.\n- [Android Studio (Preview)](https://developer.android.com/studio/preview)\n- npm\n\n```\n$ npm install\n```\n\n### Build\n\n```\n$ ./gradlew assemble\n```\n\n### Formatting\n\n```\n$ ./gradlew ktlint\n```\n\n### Publishing to [Maven Central](https://search.maven.org/)\n\n```\n$ ./gradlew :core:clean :core:build :core:publish\n....\n....\n```\n\n\n\n[Coil]: https://github.com/coil-kt/coil\n[Glide]: https://github.com/bumptech/glide\n[Picasso]: https://github.com/square/picasso\n[Fresco]: https://github.com/facebook/fresco\n","funding_links":["https://github.com/sponsors/wasabeef"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasabeef%2Ftransformers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwasabeef%2Ftransformers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasabeef%2Ftransformers/lists"}