Home > Backend Development > PHP Tutorial > PHP获取photoshop写入图片文字信息的方法_php技巧

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 20:18:35
Original
1123 people have browsed it

本文实例讲述了PHP获取photoshop写入图片文字信息的方法。分享给大家供大家参考。具体分析如下:

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

$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 <$c; $i++)
    {
      @$image_info[$s] .= $iptc[$s][$i];
    } 
  }
}
print_r($image_info);
Copy after login

希望本文所述对大家的php程序设计有所帮助。

Related labels:
Statement of this Website
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template