Home > Backend Development > PHP Tutorial > How to get the text information written by photoshop in PHP, _PHP tutorial

How to get the text information written by photoshop in PHP, _PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 09:58:48
Original
1002 people have browsed it

How PHP obtains the text information written in pictures by Photoshop,

The example in this article describes the method by which PHP obtains the text information written in pictures by Photoshop. Share it with everyone for your reference. The specific analysis is as follows:

Some photographers like to write the title, content, keywords, etc. of the picture directly into the picture file using Photoshop. It can be read with the following code.

$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

I hope this article will be helpful to everyone’s PHP programming design.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/976694.htmlTechArticleHow PHP obtains the text information written by photoshop into pictures. This article describes how PHP obtains the text information written into pictures by photoshop. method. Share it with everyone for your reference. The specific analysis is as follows:...
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