Home  >  Article  >  Backend Development  >  PHP获取photoshop写入图片文字信息的方法_PHP教程

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

WBOY
WBOYOriginal
2016-07-13 09:58:40846browse

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);

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/977159.htmlTechArticlePHP获取photoshop写入图片文字信息的方法 有些摄影师喜欢把图片的标题,内容,关键词等用photoshop直接写入图片文件里面。 用以下代码可以...
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