简体   繁体   English

Android:如何检查使用哪个相机拍摄图像

[英]Android: How to check which camera was used to capture an image

Is there a way to figure out whether the front camera or the back camera was used to capture an image? 有没有办法确定是使用前置摄像头还是后置摄像头捕获图像? If so, how can I get that information using the built-in Camera app? 如果是这样,我如何使用内置的Camera应用程序获取该信息?

Ok, first, where you must find this information? 好的,首先,您必须在哪里找到此信息? Directly in android or on a server on you have uploaded the image? 直接在android或服务器上您上传了图片?

  1. On server you can use exiftool to read the value of Camera Identifier in this way: 在服务器上,您可以通过以下方式使用exiftool读取Camera Identifier的值:

     bin_path/exiftool <imagePath> | grep -E 'Camera Identifier' 
  2. Directly in android you can try to do the same and can find usefull start code here Getting all existing exif data from an image 直接在android中,您可以尝试执行相同操作,并在此处找到有用的开始代码。 从图像中获取所有现有的exif数据

Hope this help! 希望有帮助!

阅读图像元数据,也许会有一些有用的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM