Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for Blurr - Easy Blur and Tools Library
EGEMEN
EGEMEN

Posted on

     

Blurr - Easy Blur and Tools Library

Blurr 🌁 Easy Blur and Tools Library

Simple and quick solution for blurred bitmaps.

Kotlin Version

License

version

Async or Sync, you can quickly blur your images. The library supports Bitmap, Drawable and CustomViews. You have the opportunity to use the necessary libraries separately. If you encounter an error or problem, please open a issue. It will be fixed as soon as possible. ⚡

Features

  • [x] Kotlin
  • [x] Rx3
  • [x] CustomView to Bitmap (usefull for markers - osm and gmap)
  • [x] Blurred Bitmaps
  • [x] Drawable to Bitmap
  • [x] Application Variants

General Usage

/*** @param bitmapScale should be 0-1f -> small values for more blur* @param blurRadius should be 0-25f -> bigger values for more blur** @exception RSIllegalArgumentException Radius out of range (0 < r <= 25)* @exception NullPointerException void android.graphics.Bitmap.setHasAlpha(boolean)**/funapplyRules(bitmapScale:Float,blurRadius:Float):Blurr{bS=bitmapScalebR=blurRadiusreturnthis}
Enter fullscreen modeExit fullscreen mode

Convert Drawable to Blurred Bitmap (async)

Blurr.get(this).applyRules(bS,bR).into(resources.getDrawable(R.drawable.test_image),imageViewTrial)//async
Enter fullscreen modeExit fullscreen mode

Convert Drawable to Blurred Bitmap (sync)

valbitmap2=Blurr.get(this).applyRules(bS,bR).solution(resources.getDrawable(R.drawable.test_image))
Enter fullscreen modeExit fullscreen mode

Convert View Blurred Bitmap (async)

Blurr.get(this).applyRules(bS,bR).into(view,imageViewTrial)//async
Enter fullscreen modeExit fullscreen mode

Convert View Blurred Bitmap (sync)

valbitmap1=Blurr.get(this).applyRules(bS,bR).solution(view)
Enter fullscreen modeExit fullscreen mode

Convert Bitmap to Blurred Bitmap (async)

Blurr.get(this).applyRules(bS,bR).into(bitmap!!,imageViewTrial)//async
Enter fullscreen modeExit fullscreen mode

Convert Bitmap to Blurred Bitmap (sync)

valbitmap3=Blurr.get(this).applyRules(bS,bR).solution(bitmap!!)
Enter fullscreen modeExit fullscreen mode

Tools: Bitmap From Custom Views

valbitmap4=Blurr.getTools().bitmapFromCustomView(view)
Enter fullscreen modeExit fullscreen mode

Tools: Bitmap From Drawable

valbitmap5=Blurr.getTools().bitmapFromDrawable(resources.getDrawable(R.drawable.test_image))
Enter fullscreen modeExit fullscreen mode

Implementation Gradle

Add it in your root build.gradle at the end of repositories
allprojects{repositories{maven{url'https://jitpack.io'}}}
Enter fullscreen modeExit fullscreen mode
Add the dependency
dependencies{implementation'com.github.AsynctaskCoffee:BlurryAndroid:beta-0.1'}
Enter fullscreen modeExit fullscreen mode

Implementation Maven

Add the JitPack repository to your build file
<repositories><repository><id>jitpack.io</id><url>https://jitpack.io</url></repository></repositories>
Enter fullscreen modeExit fullscreen mode
Add the dependency
<dependency><groupId>com.github.AsynctaskCoffee</groupId><artifactId>BlurryAndroid</artifactId><version>beta-0.1</version></dependency>
Enter fullscreen modeExit fullscreen mode

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

endangered software developer #kotlin #java
  • Location
    Stockholm
  • Education
    Computer Engineering
  • Work
    Software Engineer at DonanımHaber
  • Joined

More fromEGEMEN

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp