If you want to invert colors you have to use this table :
float mx [] = {
-1.0f, 0.0f, 0.0f, 1.0f, 0.0f,
0.0f, -1.0f, 0.0f, 1.0f, 0.0f,
0.0f, 0.0f, -1.0f, 1.0f, 0.0f,
1.0f, 1.0f, 1.0f, 1.0f, 0.0f
};
--
You can use a ColorMatrix in your paint brush to translate the RGBA
values of your image.
Here is a way of changing the hue 180 degrees (inverting color
only), but preserving lightness and saturation:
Canvas c = new Canvas(destBitmap);
Paint p = new Paint();
float[] mx = {
0.0f, 0.5f, 0.5f,
2 matches
Mail list logo