不能'根据相机意图以最大分辨率保存图像
我正在通过意图打开相机并尝试将图像保存到 SDCard 中的文件夹中。我可以拍摄图像并且图像正在保存。
但问题是正在存储缩略图分辨率图像(160*120)大小的图像。
这就是我正在做的...
打开相机
mIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
mIntent.putExtra(MediaStore.EXTRA_OUTPUT,
MediaStore.Images.Media.EXTERNAL_CONTENT_URI
.toString());
mIntent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);
startActivityForResult(mIntent, PHOTO_SELECT);
和活动以获得结果...
imageFileFolder = new File(Environment.getExternalStorageDirectory(),
"MyApp");
FileOutputStream out = null;
Calendar c = Calendar.getInstance();
String date = fromInt(c.get(Calendar.MONTH))
+ fromInt(c.get(Calendar.DAY_OF_MONTH))
+ fromInt(c.get(Calendar.YEAR))
+ fromInt(c.get(Calendar.HOUR_OF_DAY))
+ fromInt(c.get(Calendar.MINUTE))
+ fromInt(c.get(Calendar.SECOND));
imageFileName = new File(imageFileFolder, date.toString() + ".jpg");
try
{
out = new FileOutputStream(imageFileName);
bmp.compress(Bitmap.CompressFormat.JPEG, 100, out);
out.flush();
out.close();
scanPhoto(imageFileName.toString());
out = null;
任何人都可以帮助存储我正在拍摄的高分辨率图像...
I am taking opening the camera through intents and trying to save the image into a folder in SDCard. I can take the image and the image is getting saved.
But the problem is that is getting stored a thumbnail resolution image (160*120) size image.
This is what i am doing...
To open Camera
mIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
mIntent.putExtra(MediaStore.EXTRA_OUTPUT,
MediaStore.Images.Media.EXTERNAL_CONTENT_URI
.toString());
mIntent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);
startActivityForResult(mIntent, PHOTO_SELECT);
And on Activity for result ...
imageFileFolder = new File(Environment.getExternalStorageDirectory(),
"MyApp");
FileOutputStream out = null;
Calendar c = Calendar.getInstance();
String date = fromInt(c.get(Calendar.MONTH))
+ fromInt(c.get(Calendar.DAY_OF_MONTH))
+ fromInt(c.get(Calendar.YEAR))
+ fromInt(c.get(Calendar.HOUR_OF_DAY))
+ fromInt(c.get(Calendar.MINUTE))
+ fromInt(c.get(Calendar.SECOND));
imageFileName = new File(imageFileFolder, date.toString() + ".jpg");
try
{
out = new FileOutputStream(imageFileName);
bmp.compress(Bitmap.CompressFormat.JPEG, 100, out);
out.flush();
out.close();
scanPhoto(imageFileName.toString());
out = null;
Can anyone please help in storing the high resolution image that i am taking...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为你使用以下类来捕获图像它保存图像和图像分辨率
取决于您的相机MP...可能是..
main.xmlcameraoverlay.xml
....
并且不要忘记相机用户权限
可能在您的应用程序中工作
i think you use following class for capture image it's save image and image resolution
depend on your camera MP...may be..
main.xml
cameraoverlay.xml
and don't forget camera user permission
may work in your application....