Я должен изменить его через андроид, как в java.
byte[] pixels = ((DataBufferByte) image.getRaster().getDataBuffer()).getData();
(здесь изображение BufferedImage), но
int[] pixels;
image.getPixels(pixels, 0, width, 0, 0, width , height );
(Здесь imgae - растровое изображение) возвращает значение пикселей не как java.
Попробуйте это,
Bitmap bmp = intent.getExtras().get("data");
ByteArrayOutputStream stream = new ByteArrayOutputStream();
bmp.compress(Bitmap.CompressFormat.PNG, 100, stream);
byte[] byteArray = stream.toByteArray();