如何从图像提取相机相关信息 [英] how to extract camera related information from image

查看:140
本文介绍了如何从图像提取相机相关信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从存储在数据库中的图像中提取相机相关信息(例如相机型号,拍摄日期等)?例如,我调整了一个图像并上传并将其路径保存在数据库中。我想在显示图像时显示基本的相机信息,因此我想提取信息。谢谢。

How can I extract camera related information (eg. camera model, date taken etc) from an image stored in the database? For example, I resized an image and uploaded it and saved its path in database. I want to display basic camera information while displaying the image, therefore I want to extract the information. Thanks.

推荐答案

您想要读取EXIF数据。对于PHP,请使用exif_read_data 。示例:

You want to read the EXIF data. For PHP, use exif_read_data. Sample:

<?php
$exif = exif_read_data('img.jpg');
$model = $exif['Model'];
$iso = $exif['ISOSpeedRatings'];
$taken = $exif['DateTime'];

这篇关于如何从图像提取相机相关信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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