I use setPixel() to set the pixel to a certain value, but then when I call getPixel on the same pixel right after it, it returns a different value.
It works fine when alpha==255, but any other value it gives a different value;
This was tested on an Asus Transformer, Honeycomb 3.2
int newPixel=Color.argb(alpha, red, green, blue);
if(x==74&&y==86){
Log.w("PuzzleMaker","newPixel:"+newPixel+","+image.getConfig().name()+","+image.isMutable());
}
image.setPixel(x,y,newPixel);
if(x==74&&y==86){
int testPixel=image.getPixel(x, y);
Log.w("PuzzleMaker","testPixel:"+testPixel);
}
Log:
newPixel: 13426418,ARGB_8888,true
testPixel: -16777216
The 2 numbers in the log should be the same.