草庐IT

android - 在android中将位图转换为棕褐色

有没有办法将位图转换为深褐色?我知道转换为grayScale是在ColorMatrix中设置setSaturation。但是棕褐色呢? 最佳答案 如果您有图像实例,则可以使用ColorMartix以棕褐色绘制它。让我描述一下如何使用Drawable执行此操作。publicstaticvoidsetSepiaColorFilter(Drawabledrawable){if(drawable==null)return;finalColorMatrixmatrixA=newColorMatrix();//makingimageB&Wmat