2017-09-04 127 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> 

謝謝!