php通过exif_read_data函数获取图片的exif信息 这篇文章主要介绍了php通过exif_read_data函数获取图片的exif信息,默认情况下,php读取图片exif信息模块是不开启的,我们需要先开启这个模块。开启exif模块需要mbstring支持,这里就不详细说明了,我们来先看下函数的用法
php获取图片的exif信息,php自带一个exif_read_data函数可以用来读取图片的exif信息,代码来自php手册
?
1
2
3
4
5
6
7
8
9
10
11
12
13
$section) {
foreach ($section as $name => $val) {
echo $key.$name: $val
\n;
}
}
?>
输出结果如下
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
test1.jpg:
no header data found.
test2.jpg:
file.filename: test2.jpg
file.filedatetime: 1017666176
file.filesize: 1240
file.filetype: 2
file.sectionsfound: any_tag, ifd0, thumbnail, comment
computed.html: width=1 height=1
computed.height: 1
computed.width: 1
computed.iscolor: 1
computed.byteordermotorola: 1
computed.usercomment: exif test image.
computed.usercommentencoding: ascii
computed.copyright: photo (c) m.boerger, edited by m.boerger.
computed.copyright.photographer: photo (c) m.boerger
computed.copyright.editor: edited by m.boerger.
ifd0.copyright: photo (c) m.boerger
ifd0.usercomment: ascii
thumbnail.jpeginterchangeformat: 134
thumbnail.jpeginterchangeformatlength: 523
comment.0: comment #1.
comment.1: comment #2.
comment.2: comment #3end
thumbnail.jpeginterchangeformat: 134
thumbnail.thumbnail.height: 1
thumbnail.thumbnail.height: 1
以上所述就是本文的全部内容了,希望大家能够喜欢。
http://www.bkjia.com/phpjc/1003825.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/1003825.htmltecharticlephp通过exif_read_data函数获取图片的exif信息 这篇文章主要介绍了php通过exif_read_data函数获取图片的exif信息,默认情况下,php读取图片exif信息...