如何在android中添加图像效果?
我正在尝试在我的 Android 应用程序的图像上应用效果(棕褐色、亮度、绽放和其他图像效果(如果 API 可用))。但我完全无法获得精确且有礼貌的代码或概念来解决此类问题。虽然 Android 4.0 (API 14) 内置了 android.media.effect api,但我正在使用 Android 2.1,其中只有 Bitmap、Drawable、DrawableBitmap 等,但我不知道可以使用哪些。
I am trying to apply effect (sepia, brightness, bloom and other image effects if API for them is available) on an image for my android app. But I am totally unable to get precise and well mannered code or concept for solving such problem. Although Android 4.0 (API 14) have build in android.media.effect api in it but I am working in Android 2.1 which have only Bitmap, Drawable, DrawableBitmap e.t.c but i am not getting which to work with.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我在这里写了很多图像效果,你可以尝试:http://xjaphx.wordpress.com/ Learning/tutorials/
注意:教程旨在解释如何以最简单的方式实现图像效果算法,不建议用于生产用途。
I have written lots of image effects here, you can try: http://xjaphx.wordpress.com/learning/tutorials/
Note: the tutorials are meant to explain how image effect algorithms are implemented in the most simple way, it's not recommended for production usage.
至于皮特的回答,我尝试了他制作的所有课程,很抱歉成为派对扫兴者,但这些课程非常慢
用它们处理一张图像至少需要 10 秒。就我而言,我需要先处理 5 个图像,然后用户才能继续流程。
几个小时后,我发现了这个优秀的库,(与 gradle 集成非常容易):
https://github .com/wasabeef/picasso-transformations
这是如何使用它的示例:
As for Pete Answer I tried all of the classes he made and I'm sorry to be a party pooper but these classes are very slow
it took at least 10 sec to process an Image with them. in my case I needed to process 5 images before the user can proceed with the flow.
after a few hours I came across this excellent library,(super easy to integrate with gradle):
https://github.com/wasabeef/picasso-transformations
this is an example of how to use it: