Hey Community,
My question is very simple. Is it possible to replace a color with another in one bitmap? I found already a way to remove a color but no way to replace something...
You must probably "draw" a bitmap, with your image inside (load), check the colors of each pixel and then draw over your bitmap on the specific position where you have found that color. After this just save the bitmap.
Hello @chrjak,
You need the RSImageProcessing Library. The code below will replace the color Black with the color Red in a jpg. Please look at the attached file. The bottom half of the image is actually black.
B4X:
'RSImageProcessing library needed
Dim rsie As RSImageEffects
Dim ImageViewTemp As ImageView
ImageViewTemp.Initialize("")
Dim BitmapTemp As Bitmap
BitmapTemp.Initialize(File.DirAssets, "Image1.jpg")
BitmapTemp = rsie.ReplaceColor(BitmapTemp, Colors.Black, Colors.Red)
ImageViewTemp.Bitmap = BitmapTemp
Activity.AddView(ImageViewTemp, 0dip, 0dip, 100%x, 100%y)
wow, thank you all so much!
That helped me really!
@simpson I knew there is somewhere i function i already red over this some months before @Fusseldieb and @derez thanks so much! Now I know how to do a great animation