2017-09-04 73 views
-3

我想为android制作一个色彩效果应用程序。 如何通过Android Studio上的代码将颜色效果应用于图像?示例图片; enter image description hereAndroid图像滤镜应用程序

enter image description here

我不知道如何通过代码来实现彩色效果图像的想法。例如,如果我想从Photoshop中实现这种效果,我该怎么办? enter image description here

我期待的最终结果; IMAGE

+0

您必须根据您的“滤镜”来逐个像素地解析原始照片的每个像素值,例如可以增加像素的r(红色)值以突出显示图像的红色。关于如何实现更复杂的滤镜(如模糊,锐化或涂抹),您可以在网上找到大量信息。 – Jonatan

回答

-1

创建图像的顶部视图和背景色设置为所需的一个,减少增加透明度

<FrameLayout 
     android:height="wrap_content" 
     android:width="wrap_content"> 
     <ImageView 
      android:height="yourheight" 
      android:width="yourwidth" 
      android:src="@drawable/yourimage" /> 
     <View 
      android:height="match_parent" 
      android:width="match_parent" 
      android:background="yourcolorinAGBRformat"> 
</FrameLayout> 

谢谢!