Home >php教程 >php手册 >PHP获取photoshop写入图片文字信息的方法

PHP获取photoshop写入图片文字信息的方法

WBOY
WBOYOriginal
2016-06-13 09:08:16967browse

PHP获取photoshop写入图片文字信息的方法

 有些摄影师喜欢把图片的标题,内容,关键词等用photoshop直接写入图片文件里面。 用以下代码可以读取。

 

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

$image_info = array();

$size = getimagesize('图片文件.jpg', $info);

if(isset($info['APP13']))

{

$iptc = iptcparse($info['APP13']);

foreach (array_keys($iptc) as $s)

{

$c = count ($iptc[$s]);

for ($i=0; $i

{

@$image_info[$s] .= $iptc[$s][$i];

}

}

}

print_r($image_info);

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn