用相机拍摄图像并隐藏其他相机设置 [英] Capture image with camera and hide additional camera settings

查看:313
本文介绍了用相机拍摄图像并隐藏其他相机设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用MediaStore.ACTION_IMAGE_CAPTURE意图启动相机视图,并且能够成功捕获图像并且一切正常.

I am using MediaStore.ACTION_IMAGE_CAPTURE intent to launch camera view and i am able to successfully capture the images and all working fine.

下面编写的示例代码,

Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE);
intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);

// start the image capture Intent
startActivityForResult(intent, CAMERA_CAPTURE_IMAGE_REQUEST_CODE);

我关心的是启动相机时,还有其他图标,例如模式,相机设置可以以某种方式将其隐藏.当您使用诸如whatsapp或Viber或Hike之类的第三方应用程序/聊天应用程序时,我已经看到这种情况的发生.

My concern is when camera is launched and there are additional icons like, mode, settings of camera can i somehow hide it. I have seen this happening when you use thir-dparty apps/chat apps like whatsapp or Viber or Hike there is just plain button to capture the image.

如何禁用通过我的应用程序启动的相机的照片/图像捕获屏幕上显示的其他内容,或者有什么方法可以实现此目的?

How do i disable additional stuffs being show on camera's photo/image capture screen which is launched through my app or is there any way to achieve this?

推荐答案

这些应用未使用已安装的cam应用来捕获它们,而是通过cam流创建了自己的视图.

These app are not using installed cam app for capturing they create thier own view with cam streaming.

此处是包含凸轮流媒体库的示例应用.

非常容易集成

注意: 1.4.1最好不要编译,然后尝试使用1.2.3

Note: 1.4.1 well not compile then try with 1.2.3

编译'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.4.1'

@Override
public void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity);

    Uri imageUri = ...;
    mGPUImage = new GPUImage(this);
    mGPUImage.setGLSurfaceView((GLSurfaceView) findViewById(R.id.surfaceView));
    mGPUImage.setImage(imageUri); // this loads image on the current thread, should be run in a thread
    mGPUImage.setFilter(new GPUImageSepiaFilter());

    // Later when image should be saved saved:
    mGPUImage.saveToPictures("GPUImage", "ImageWithFilter.jpg", null);
}

这篇关于用相机拍摄图像并隐藏其他相机设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆