如何改变位图的色温?
我试过这个方法,我在网上找到的:
ColorMatrix colorMatrix = new ColorMatrix();
colorMatrix.set(new float[] {
temp/255.0f, 0, 0, 0, 0,
0, temp/255.0f, 0, 0, 0
0, 0, temp/255.0f, 0, 0,
0, 0, 0, 1, 0});
// temp is the float i change with seekbar's progress
//i replace 255.0f with values from below's link!
http://www.vendian.org/mncharity/dir3/blackbody/UnstableURLs/bbr_color.html 你确定你不是在谈论ColorFilter吗?
Drawable drawable = new BitmapDrawable(bmp);
drawable.setColorFilter(warmColor, PorterDuff.Mode.MULTIPLY);