在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):kikoso/android-stackblur开源软件地址(OpenSource Url):https://github.com/kikoso/android-stackblur开源编程语言(OpenSource Language):Java 38.4%开源软件介绍(OpenSource Introduction):Android StackBlurAndroid StackBlur is a library that can perform a blurry effect on a Bitmap based on a gradient or radius, and return the result. The library is based on the code of Mario Klingemann. The library is compatible for Android versions 1.5 (so pretty much compatible with every device). A library and a sample application are provided with the code. Acknowledgements
UsageDownload the library with git. When it has been imported into your project. First initialize your StackBlurManager to load a sample image: stackBlurManager = new StackBlurManager(getBitmapFromAsset(this, "android_platform_256.png")); Process using a certain radius with the following line: stackBlurManager.process(progress*5); and finally obtain the image and load it into an ImageView or any other component: imageView.setImageBitmap(_stackBlurManager.returnBlurredImage() ); If you want to use the native code (NDK), first you need to compile the native files. Move to the folder where you have the project, and call: ndk-build If everything goes alright, you will compile and generate a library object, libblur.so, in the folder libs. For more information regarding the NDK framework, please click here. Then, from the code you just need to code: stackBlurManager.processNatively(progress*5); The function processNatively(int radius) return the image already blurry. This code is 25-30 times faster as the Java code. If you want to use RenderScript, you can do it by using: stackBlurManager.processRenderScript(progress*5); Version history
Next stepsAs soon as I get some free time I want to add the following features:
If you want to colaborate with the project, feel free to submit a pull request! Also, if you have used Android StackBlur on your app and you let me know, I can link it from here :) Developed ByEnrique López Mañas - [email protected] |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论