解决了:
EncodedImage ei = EncodedImage.createEncodedImage(data,
arrayIndex, data.length - arrayIndex);
/**
* Change this number, <100 makes the image bigger by
* percentage. i.e. 90 makes the image 110% normal
size.
* By increasing, you will reduce the image size,
* e.g. 110 makes the image 90% normal size.
*
*/
int divisor = Fixed32.toFP(100);
int multiplier = Fixed32.toFP(170);
/**
* width
*/
int fixedX = Fixed32.toFP(1);
fixedX = Fixed32.div(fixedX, divisor);
fixedX = Fixed32.mul(fixedX, multiplier);
/*
* height
*/
int fixedY = Fixed32.toFP(1);
/** divide the image scale by 100. */
fixedY = Fixed32.div(fixedY, divisor);
/** multiply the image scale by the multiplier. */
fixedY = Fixed32.mul(fixedY, multiplier);
cameraImage = ei.scaleImage32(fixedX, fixedY).getBitmap
();