1
我有一個相機應用程序,我正在拍攝一張圖像並將其存儲在SD卡中。圖像分辨率
當我檢查存儲的圖像的分辨率,它被發現爲120X160像素。
但是,相機拍攝的正常圖像是640X480像素。
我不希望分辨率降低。你可以解釋爲什麼會發生這種情況?
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// TODO Auto-generated method stub
super.onActivityResult(requestCode, resultCode, data);
if(resultCode == RESULT_OK){
Bundle extras = data.getExtras();
Bitmap bmp1 = (Bitmap) extras.get("data");
//now storing the image in sdcard, folder name is same as the model name
ByteArrayOutputStream bytes1 = new ByteArrayOutputStream();
scaled1.compress(Bitmap.CompressFormat.PNG, 100, bytes1);
File f1 = new File(folder,"bmp1.png");
try {
f1.createNewFile();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
FileOutputStream fo1 = null;
try {
fo1 = new FileOutputStream(f1);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
fo1.write(bytes1.toByteArray());
fo1.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
威爾我要創建我自己的相機活動?我是初學者..所以請幫助
你的問題的解決方案,可以發現[這裏](http://stackoverflow.com/questions/2729267/android-camera-intent) – Renard
u能PLZ指定鏈接? – Kumar
「數據」額外不是爲了將捕獲的圖像傳送到您的應用程序;它只是一個縮略圖,可以用作圖標或網格視圖。除非您明確要求不同的位置(不是普遍支持的功能),否則全尺寸照片將與相機應用拍攝的所有常規膠片卷一起存儲。 –