如何给上一个ImageView的效果色调分离? [英] How to Give a posterize effect on imageview?

查看:211
本文介绍了如何给上一个ImageView的效果色调分离?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图给一个Photoshop色调分离效果imageview.here是一个正常的图像。

应用色调分离效果后,应该是这样的,这种影响从的Pixlr的图像编辑器

我想确切疗效编程。

我曾尝试是,我试图让与SaturationFilter样的效果类似的效果,因为我无法找到Android的多色调分色方法。

这里是我的功能 http://pastie.org/8007887

和产生的图像,下面这是不是在寻找类似Photoshop的分色效果,我曾尝试过多种饱和程度,但没有luck.i希望有些人会指导我以适当的方式。

找到一些方法, http://developer.android.com/参考/安卓/媒体/效果/ EffectFactory.html 的这里是分色效果的理念为指导,这是适用于Android的API级别14,哪些使用API​​级别和LT设备是什么; 14


解决方案

有一个好的图书馆提供名为 JHLabs'Java图像处理

它有很多可用的图像处理过滤器。我还使用该库在我的应用程序。它与Android也很兼容。

您还可以下载 源$ C ​​$ C 并运行示例应用程序。

JAR下载: http://www.jhlabs.com/ip/过滤器/ Filters.zip

i am trying to give a Photoshop posterization effect to imageview.here is a normal image.

after applying posterization effect it should look like this,this effect is taken from pixlr image editor

I want exact effect programmatically.

what I have tried is, I am trying to get similar effect with SaturationFilter kind of effect, as I am not able to find posterization method for android.

here is my function http://pastie.org/8007887

and resulting image is,as below which is not looking similar to Photoshop posterized effect, I have tried passing several saturation level,but no luck.i hope some one will guide me in a proper way.

found some way, http://developer.android.com/reference/android/media/effect/EffectFactory.html here is a guidline for posterization effect,and that is applicable for android API level 14,what about device which use API level <14?

解决方案

There is a good library available named JHLabs' Java Image Processing.

It has lots of image processing filters available. I also use that library in my application. It is very compatible with Android also.

You can also download source code and run sample application.

JAR Download : http://www.jhlabs.com/ip/filters/Filters.zip

这篇关于如何给上一个ImageView的效果色调分离?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆