The Native-Blur is a C /Kotlin libraray for blur bitmaps and activity, mobile-ready, android compatible, powered by Java Native Interface(JNI) library for Android.
- Blur bitmap and resourses
- Blure activty
- Compress
For blur the Activty:
val overlayBlurView = OverlayBlurView(activity)
overlayBlurView.show()
overlayBlurView.hide()
With Xml support view:
<me.abolfazl.nativeblur.BlurView
android:layout_width="match_parent"
android:layout_height="march_parent"
android:scaleType="centerCrop"
android:src="@drawable/spacex"
app:compress="true"
app:radius="20" />
Directly Bitmap:
val source = BitmapFactory.decodeResource(resources, R.drawable.spacex2)
val bitmap = NativeBlur.blurBitmap(source, 10, false)
imageview.setImageDrawable(BitmapDrawable(resources, bitmap))
Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
Add the dependency
dependencies {
implementation 'com.github.aabolfazl:Native-Blur:1.0.0'
}
Memory allocation and Heap limit size for an application(in Java program throws an exception but in C done successfully)
- Abolfazl Abbasi @0x40x4
- Stack Blur Algorithm by Mario Klingemann
- Telegram open source project
SpaceX Image from @Daniel Sanchez Photography
MIT
Free Software developed for Teknasyon Üçbüyücü Turnuvası!