« first day (571 days earlier)      last day (1857 days later) » 

9:23 AM
public void onPictureTaken(byte[] data, Camera camera) {

myFile = (data wrote in a file)

bitmap = BitmapFactory.decodeFile(myFile .getPath());
int width = bitmap.getWidth();
int height = bitmap.getHeight();
// rotate image in portrait
Matrix matrix = new Matrix();
matrix.postRotate(90);

// here comes error
rotatedBitmap = Bitmap.createBitmap(bitmap, 0, 0,width, height, matrix, true);
I have substitute this
bitmap = BitmapFactory.decodeFile(myFile .getPath());
with this
bitmap = decodeFile(temp, 1024);
That's my method for reducing bitmap to max size 1024
 
2 messages moved from Android Discussion
 

« first day (571 days earlier)      last day (1857 days later) »