How to use PHP to get the text information written into pictures by Photoshop
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.
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 <$c; $i )
{
@$image_info[$s] .= $iptc[$s][$i];
}
}
}
print_r($image_info);
|
1
2
3
4
5
6
7
8
9
10
11
1213
14
15
|
$image_info = array();
$size = getimagesize('image file.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);
|
http://www.bkjia.com/PHPjc/977159.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/977159.htmlTechArticlePHP How to get photoshop to write text information in pictures Some photographers like to put the title, content, keywords, etc. of the picture Use photoshop to write directly into the image file. Use the following code to...
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