An Android transformation library providing a variety of image transformations for Coil, Glide, Picasso, and Fresco.
An Android transformation library providing a variety of image transformations for Coil, Glide, Picasso, and Fresco.
Glide Transformations, Picasso Transformations, Fresco Processors are deprecated.
Development will stop soon.. For an up-to-date version, please use this.
repositories { mavenCentral() }
This Transformer is NOT using android.support.v8.rendererscript because
librs.somake the APK file too big.
dependencies { implementation 'jp.wasabeef.transformers:coil:1.0.3' // Use the GPU Filters implementation 'jp.wasabeef.transformers:coil-gpu:1.0.3' }
imageView.load(IMAGE_URL) { transformations( CropCenterTransformation(), RoundedCornersTransformation(radius = 120, cornerType = CornerType.DIAGONAL_FROM_TOP_LEFT) ) }
dependencies { implementation 'jp.wasabeef.transformers:glide:1.0.3' // Use the GPU Filters implementation 'jp.wasabeef.transformers:glide-gpu:1.0.3' }
Glide.with(context) .load(IMAGE_URL) .apply( bitmapTransform( MultiTransformation( CropCenterTransformation(), BlurTransformation(context, 15, sampling = 1) ) ) ).into(imageView)
dependencies { implementation 'jp.wasabeef.transformers:picasso:1.0.3' // Use the GPU Filters implementation 'jp.wasabeef.transformers:picasso-gpu:1.0.3' }
Picasso.get() .load(IMAGE_URL) .fit().centerInside() .transform( mutableListOf( CropCenterTransformation(), BlurTransformation(context, 25, sampling = 4) ) ).into(imageView)
dependencies { implementation 'jp.wasabeef.transformers:fresco:1.0.3' // Use the GPU Filters implementation 'jp.wasabeef.transformers:fresco-gpu:1.0.3' }
val request: ImageRequest = ImageRequestBuilder.newBuilderWithSource(IMAGE_URL.toUri()) .setPostprocessor(BlurPostprocessor(context, 25, 4)) .build()holder.image.controller = Fresco.newDraweeControllerBuilder() .setImageRequest(request) .setOldController(draweeView.controller) .build()
Use Composable Images when using with Jetpack Compose.
GlideImage( model = IMAGE_URL, modifier = Modifier.preferredWidth(120.dp), options = RequestOptions().transform( BlurTransformation(context, radius = 25, sampling = 4) ) )
| Original | Mask | NinePatchMask | CropTop |
|:---:|:---:|:---:|:---:|
| |
|
|
|
| CropCenter | CropBottom | CropCenterRatio16x9 | CropCenterRatio4x3 |
|
|
|
|
|
| CropTopRatio16x9 | CropBottomRatio4x3 | CropSquare | CropCircle |
|
|
|
|
|
| CropCircleWithBorder | ColorFilter | Grayscale | RoundedCorners |
|
|
|
|
|
| RoundedCornersTopLeft | RSGaussianBlurLight | RSGaussianBlurDeep | StackBlurLight |
|
|
|
|
|
| StackBlurDeep |
|
|
coil, glide, picasso - BlurTransformation - ColorFilterTransformation - CropCenterBottomTransformation - CropCenterTopTransformation - CropCenterTransformation - CropCircleTransformation - CropCircleWithBorderTransformation - CropSquareTransformation - CropTransformation - GrayscaleTransformation - MaskTransformation - RoundedCornersTransformation
fresco - BlurPostprocessor - ColorFilterPostprocessor - CombinePostProcessors - GrayscalePostprocessor - MaskPostprocessor
We recommend that you have a ToneCurve file, as you can apply any filters you like.
| Original | Sepia | Contrast | Invert |
|:---:|:---:|:---:|:---:|
| |
|
|
|
| PixelLight | PixelDeep | Sketch | Swirl |
|
|
|
|
|
| Brightness | Kuawahara | Vignette | ZoomBlur |
|
|
|
|
|
| WhiteBalance | Halftone | Sharpness | Toon |
|
|
|
|
|
| ToneCurve |
|
|
coil-gpu, glide-gpu, picasso-gpu - BrightnessFilterTransformation - ContrastFilterTransformation - HalftoneFilterTransformation - InvertFilterTransformation - KuwaharaFilterTransformation - PixelationFilterTransformation - SepiaFilterTransformation - SharpenFilterTransformation - SketchFilterTransformation - SwirlFilterTransformation - ToneCurveFilterTransformation - ToonFilterTransformation - VignetteFilterTransformation - WhiteBalanceFilterTransformation - ZoomBlurFilterTransformation
fresco-gpu - BrightnessFilterPostprocessor - ContrastFilterPostprocessor - HalftoneFilterPostprocessor - InvertFilterPostprocessor - KuwaharaFilterPostprocessor - PixelationFilterPostprocessor - SepiaFilterPostprocessor - SharpenFilterPostprocessor - SketchFilterPostprocessor - SwirlFilterPostprocessor - ToneCurveFilterPostprocessor - ToonFilterPostprocessor - VignetteFilterPostprocessor - WhiteBalanceFilterPostprocessor - ZoomBlurFilterPostprocessor
Things you will need
$ npm install
$ ./gradlew assemble
$ ./gradlew ktlint
$ ./gradlew clean build publish