当我保存在某些设备上拍摄的照片时,它会保存为一些奇怪的线条。我不知道如何描述这张图片的外观,所以这里是:
我的代码在大多数设备上都能完美运行,但我们有两个用户使用以下设备发言。
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();
}
}
};
感谢您的任何帮助...