代码:$file_arr = read_exif_data('./1.png');

var_dump($file_arr);

结果:array (size=49)

'FileName' => string '2.png' (length=5)

'FileDateTime' => int 1446107171

'FileSize' => int 2640955

'FileType' => int 2

'MimeType' => string 'image/jpeg' (length=10)

'SectionsFound' => string 'ANY_TAG, IFD0, THUMBNAIL, EXIF, INTEROP' (length=39)

'COMPUTED' =>

array (size=12)

'html' => string 'width="4128" height="2322"' (length=26)

'Height' => int 2322

'Width' => int 4128

'IsColor' => int 1

'ByteOrderMotorola' => int 0

'ApertureFNumber' => string 'f/2.2' (length=5)

'UserComment' => null

'UserCommentEncoding' => string 'ASCII' (length=5)

'Thumbnail.FileType' => int 2

'Thumbnail.MimeType' => string 'image/jpeg' (length=10)

'Thumbnail.Height' => int 288

'Thumbnail.Width' => int 512

'ImageWidth' => int 4128

'ImageLength' => int 2322

'Make' => string 'SAMSUNG' (length=7)

'Model' => string 'GT-I9500' (length=8)

'Orientation' => int 3

'XResolution' => string '72/1' (length=4)

'YResolution' => string '72/1' (length=4)

'ResolutionUnit' => int 2

'Software' => string 'I9500ZCUHND1' (length=12)

'DateTime' => string '2015:10:29 16:05:28' (length=19)

'YCbCrPositioning' => int 1

'Exif_IFD_Pointer' => int 226

'THUMBNAIL' =>

array (size=9)

'ImageWidth' => int 512

'ImageLength' => int 288

'Compression' => int 6

'Orientation' => int 3

'XResolution' => string '72/1' (length=4)

'YResolution' => string '72/1' (length=4)

'ResolutionUnit' => int 2

'JPEGInterchangeFormat' => int 10570

'JPEGInterchangeFormatLength' => int 11304

'ExposureTime' => string '1/33' (length=4)

'FNumber' => string '22/10' (length=5)

'ExposureProgram' => int 2

'ISOSpeedRatings' => int 160

'ExifVersion' => string '0220' (length=4)

'DateTimeOriginal' => string '2015:10:29 16:05:28' (length=19)

'DateTimeDigitized' => string '2015:10:29 16:05:28' (length=19)

'ShutterSpeedValue' => string '506/100' (length=7)

'ApertureValue' => string '227/100' (length=7)

'BrightnessValue' => string '177/100' (length=7)

'ExposureBiasValue' => string '0/10' (length=4)

'MaxApertureValue' => string '227/100' (length=7)

'MeteringMode' => int 2

参数说明:

'文件名' => $infoAll['FileName'],

'文件修改时间' => date('Y:m:d H:i:s',$infoAll['FileDateTime']),

'文件大小' => round($infoAll['FileSize']/1024) . 'kb',

'Exif文件类型' => $this->getImgtype($imgPath,'Exif'),

'Mime文件类型' => $infoAll['MimeType'],

'找到Sections' => $infoAll['SectionsFound'],

'html中图片宽高' => $infoAll['html'],

'图片高度' => $infoAll['Height'] . 'px',

'图片宽度' => $infoAll['Width'] . 'px',

'是否彩色' => $infoAll['IsColor'] == 1 ? '是' : '否',

'是否为Motorola字节顺序' => $infoAll['ByteOrderMotorola'] == 1 ? '是' : '否',

'光圈数' => $infoAll['ApertureFNumber'],

'作者注释' => $infoAll['Comments'],

'作者' => $infoAll['Author'],

'用户注释' => $infoAll['UserComment'],

'用户注释编码' => $infoAll['UserCommentEncoding'],

'缩略图Exif文件类型' => $this->getImgtype($imgPath,'Exif'),

'缩略图Mime文件类型' => $infoAll['Thumbnail.MimeType'],

'制造商' => $infoAll['Make'],

'型号' => $infoAll['Model'],

'方向' => array_search($infoAll['Orientation'],array(

'top left side' => 1,

'top right side' => 2,

'bottom right side' => 3,

'bottom left side' => 4,

'left side top' => 5,

'right side top' => 6,

'right side bottom' => 7,

'left side bottom' => 8

)),

'水平分辨率' => $infoAll['XResolution'],

'垂直分辨率' => $infoAll['YResolution'],

'分辨率单位' => array_search($infoAll['ResolutionUnit'],array(

'无单位' => 1,

'英寸' => 2,

'厘米' => 3

)),

'创建软件' => $infoAll['Software'],

'最后修改时间' => $infoAll['DateTime'],

'YCbCr位置控制' => $infoAll['YCbCrPositioning'] == 1 ? '像素阵列的中心' : '基准点',

'Exif图像IFD的指针' => $infoAll['Exif_IFD_Pointer'],

'压缩方式' => $infoAll['Compression'] == 6 ? 'jpeg压缩' : '无压缩',

'JPEG SOI偏移' => $infoAll['JPEGInterchangeFormat'],

'JPEG数据字节' => $infoAll['JPEGInterchangeFormatLength'],

'曝光时间' => $infoAll['ExposureTime'] . '秒',

'焦距比数' => $infoAll['FNumber'],

'曝光程序' => array_search($infoAll['ExposureProgram'],array(

'手动控制' => 1,

'程序控制' => 2,

'光圈优先' => 3,

'快门优先' => 4,

'景深优先' => 5,

'运动模式' => 6,

'肖像模式' => 7,

'风景模式' => 8

)),

'ISO感光度' => $infoAll['ISOSpeedRatings'],

'Exif版本' => $infoAll['ExifVersion'],

'拍摄时间' => $infoAll['DateTimeOriginal'],

'数字化时间' => $infoAll['DateTimeDigitized'],

'分量配置' => $infoAll['ComponentsConfiguration'],

'图像压缩率' => $infoAll['CompressedBitsPerPixel'],

'曝光补偿' => $infoAll['ExposureBiasValue'] . '电子伏特',

'最大光圈值' => $infoAll['MaxApertureValue'],

'测光模式' => array_search($infoAll['MeteringMode'],array(

'未知' => 0,

'平均' => 1,

'中央重点平均测光' => 2,

'点测' => 3,

'分区' => 4,

'评估' => 5,

'局部' => 6,

'其他' => 255

)),

'光源' => array_search($infoAll['LightSource'],array(

'未知' => 0,

'日光灯' => 1,

'荧光灯' => 2,

'钨丝灯' => 3,

'闪光灯' => 10,

'标准灯光A' => 17,

'标准灯光B' => 18,

'标准灯光C' => 19,

'D55' => 20,

'D65' => 21,

'D75' => 22,

'其他' => 255,

)),

'闪光灯' => array_search($infoAll['Flash'],array(

'闪光灯未闪光' => 0,

'闪光灯已闪光' => 1,

'闪光灯已闪光但频闪观测器未检测到返回光源' => 5,

'闪光灯已闪光,频闪观测器检测到返回光源' => 7

)),

'焦距' => $infoAll['FocalLength'] . '毫米',

'亚秒时间' => $infoAll['SubSecTime'],

'亚秒级拍摄时间' => $infoAll['SubSecTimeOriginal'],

'亚秒级数字化时间' => $infoAll['SubSecTimeDigitized'],

'FlashPix版本' => $infoAll['FlashPixVersion'],

'色彩空间' => $infoAll['ColorSpace'] == 1 ? 'sRGB' : 'Uncalibrated',

'Exif图片宽度' => $infoAll['ExifImageWidth'] . 'px',

'EXif图片高度' => $infoAll['ExifImageLength'] . 'px',

'IFD格式数据偏移量' => $infoAll['InteroperabilityOffset'],

'彩色区域传感器类型' => $infoAll['SensingMethod'] == 2 ? '单色区传感器' : '其他',

'图片像源' => $infoAll['FileSource'] == '0x03' ? '数码相机' : '其他',

'场景类型' => $infoAll['SceneType'] == '0x01' ? '直接拍摄' : '其他',

'滤波阵列图案' => $infoAll['CFAPattern'],

'自定义图像处理' => $infoAll['CustomRendered'],

'曝光模式' => $infoAll['CustomRendered'] == 1 ? '手动' : '自动',

'白平衡' => $infoAll['WhiteBalance'] == 1 ? '手动' : '自动',

'数位变焦倍率' => $infoAll['DigitalZoomRatio'],

'等价35mm焦距' => $infoAll['FocalLengthIn35mmFilm'] . '毫米',

'取景模式' => array_search($infoAll['SceneCaptureType'],array(

'自动' => 0,

'肖像场景' => 1,

'景观场景' => 2,

'运动场景' => 3,

'夜景' => 4,

'自动曝光' => 5,

'光圈优先自动曝光' => 256,

'快门优先自动曝光' => 512,

'手动曝光' => 768,

)),

'增益控制' => $infoAll['GainControl'],

'对比度' => array_search($infoAll['Contrast'],array(

'低' => -1,

'普通' => 0,

'高' => 1

)),

'饱和度' => array_search($infoAll['Saturation'],array(

'低' => -1,

'普通' => 0,

'高' => 1

)),

'清晰度' => array_search($infoAll['Sharpness'],array(

'低' => -1,

'普通' => 0,

'高' => 1

)),

'对焦距离' => array_search($infoAll['SubjectDistanceRange'],array(

'未知' => 0,

'微距' => 1,

'近景' => 2,

'远景' => 3

)),

'InterOperability指数' => $infoAll['InterOperabilityIndex'],

'InterOperability版本' => $infoAll['InterOperabilityVersion']

以上就介绍了PHP 获取图片信息exif,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

本条技术文章来源于互联网,如果无意侵犯您的权益请点击此处反馈版权投诉

本文系统来源:php中文网

php怎么获取图片信息,PHP获取图片信息exif相关推荐

  1. Silverlight学习笔记十七BingMap(六)之获取图片系统的图片信息ImageryService的应用...

    BIngMap的ImageryService服务是一个微软发布的WCF服务,它用来获取图片系统的图片信息.服务地址:http://dev.virtualearth.net/webservices/v1 ...

  2. 使用imageIO获取和修改图片的exif信息

    看到这篇文章.喜欢的不得了-转来分享给大家! 一幅图片除了包含我们能看见的像素信息,背后还包含了拍摄时间,光圈大小,曝光等信息.UIImage类将这些细节信息都隐藏了起来,只提供我们关心的图片尺寸,图 ...

  3. 三种方式获取大疆照片的EXIF/XMP信息(附测试代码)

    目录 软件方式 在线方式 Python方式 第一种:pyexiv2 第二种:pyexif 测试代码:三种方式获取大疆照片的EXIF/XMP信息(附测试代码) - 小锋学长生活大爆炸 (xfxuezha ...

  4. 【Groovy】MOP 元对象协议与元编程 ( Groovy 类内部和外部分别获取 metaClass | 分析获取 metaClass 操作的字节码 | HandleMetaClass 注入方法 )

    文章目录 一.Groovy 类内部和外部分别获取 metaClass 二.分析 Groovy 类内部和外部获取 metaClass 操作的字节码 三.使用 HandleMetaClass 注入方法 一 ...

  5. linux shell数组定义、元素获取及其长度获取

    linux shell数组定义.元素获取及其长度获取

  6. linux c 读取摄像头,Linux下onvif客户端获取ipc摄像头 获取能力:GetCapabilities

    getcapabilities:获取能力,主要目的获取设备能力信息(获取媒体服务地址) 鉴权:但是在调用获取设备能力之前是需要鉴权的.onvif协议规定,部分接口需要鉴权,部分接口不需要鉴权,在调用需 ...

  7. java 获取路径_java 获取当前类的路径

    最近在做项目的时候,自己写了一些配置参数的读取,将配置文件放到具体的位置,然后让程序根据当前类的路径寻找配置文件的路径,但是,发现eclipse的开发坏境下是可以顺利读取到指定路径下的配置文件中的配置 ...

  8. VB 获取路径名各部分 (获取文件路径,获取文件名,获取文件扩展名)自编

    '====================获取路径名各部分:  如: c:\dir1001\aaa.txt '============获取路径路径 c:\dir1001\ '============获 ...

  9. java 获取域名_Java获取域名,Java从URL地址中获取域名,Java从Request 获取域名

    Java  获取主域名方法有很多种,有的用截串方式,我用的一个投机取巧的方式,这个获取域名的方法比较简单,代码也较少. Java从URL地址中获取域名//这样获取的方式,不请求就能获取到域名 URL ...

  10. WMPF微信小程序框架 微信刷脸登录 获取openId 授权获取手机号 快速接入 快速集成

    官方Demo Github:WMPF微信小程序框架 推荐开发前先快速了解API:wiki 快速接入Demo:WMPF快速接入demo 运行环境下载:WMPF运行环境(待上传) 应⽤版本 刷脸 SDK, ...

最新文章

  1. Win7下提取加密PDF文件(pdf加密成exe)
  2. 关于ics lab8 performance中的rotate
  3. 使用数据库维护计划SQL Server更新统计信息
  4. Ansi,UTF8,Unicode编码
  5. 实现用于意图识别的文本分类神经网络
  6. Angular 响应式表单 patchValue和setValue
  7. 三级等级保护之安全管理中心
  8. windows系统腾讯qq自带截图工具自动滚动截长图方法
  9. Android各版本号及其英文别名
  10. 如何准备国家公务员考试
  11. 怎么关闭fcitx的简繁切换和vscode的查找快捷键冲突了
  12. Nginx代理高德API
  13. 丢失MSVCR120.dll
  14. php截图整个网页,selenium save_screenshot 如何进行全网页截图?
  15. markdown写公众号
  16. 看懂英文数据手册、搭建电路
  17. html盒子移动动画代码,js实现盒子移动动画效果
  18. Fabled Rooks
  19. 免费送 2800套精品小程序源码!
  20. Could not resolve placeholder 占位符不能被解析

热门文章

  1. android 触摸接口,Android 多点触摸接口
  2. 浏览器pdf朗读插件
  3. java ico图片转png_Java图片处理:ico格式转 PNG/JPG等格式
  4. 2020年春节抢票神器
  5. Mac入门指南(二)常用命令
  6. 记录一次iPhone5s的iCloud bypass经历
  7. 软件在线升级系统的设计与实现
  8. 简历中尽量不要出现精通_在个人简历中,熟悉、了解、熟练、精通之间有什么区别?...
  9. wine linux 目录,linux下wine安装
  10. 就晚间宿舍熄灯时间调查