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:40
Original
944 people have browsed it

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

6 7 8 9 10
11 12
13 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 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