当我保存在某些设备上拍摄的照片时,它会保存为一些奇怪的线条。我不知道如何描述这个图像的外观所以这里是:
我的代码在大多数设备上运行良好,但我们有两个用户使用以下设备。
1. HTC Thunderbolt
2. HTC Inspire
有人知道这是怎么回事吗?这是我的代码:
PictureCallback jpegCallback = new PictureCallback() {
public void onPictureTaken(byte[] data, Camera camera) {
mPreview.mCamera.startPreview();
Log.e(TAG, "onPictureTaken - jpegCallback");
try {
// start camera saving system
CameraPhoneStorageSystem camStorageSys = new CameraPhoneStorageSystem(
mContext);
FileOutputStream out = null;
String str = CameraPhoneStorageSystem
.returnImageNewNameForExternalMemory();
galleryAddPic(str);
out = new FileOutputStream(str);
// mutableBitmap.compress(CompressFormat.JPEG, 85, out);
out.write(data, 0, data.length);
out.flush();
out.close();
out = null;
Toast.makeText(mContext, "saved..", Toast.LENGTH_SHORT).show();
} catch (IOException e) {
Toast.makeText(
mContext,
"Error: Problem Saving Image.. Please check device memory",
Toast.LENGTH_SHORT).show();
Log.e("saving", "problem saving images", e);
} catch (Exception e) {
// fail
Log.d(TAG, "ERROR: " + e.getMessage());
} finally {
anyPicturesTaken = true;
progressBar.setVisibility(View.GONE);
snapButton.setVisibility(ImageButton.VISIBLE);
Runtime.getRuntime().gc();
}
}
};
感谢您的帮助......
答案 0 :(得分:0)