I'm taking a picture with the camera activity and then try to read it from the saved location. Unfortunately the Bitmap returnd by:
Bitmap bimage = BitmapFactory.decodeFile( path );
has height and width = -1. I'm using OpenCV and when I read the image with
Mat img = Highgui.imread(path);
I get a proper matrix. Altough I cannot convert it to a bitmap. When doing
bmp = Bitmap.createBitmap(img.cols(), img.rows(), Config.ARGB_8888);
Utils.matToBitmap(img, bmp);
I get the same result again: A Bitmap with width and height = -1. Do I need to watch out for the image format? Can I set that on the camera intent? Shouldn't
BitmapFactory.decodeFile( path );
automatically realize what the format is?
I'm running this on a Samsung galaxy S with Android 2.3.1 and OpenCV 2.3.1
Thanks for your help.