mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Allow the example for iptcembed to write its result to the original
.jpg file. Addresses bug #49595. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@288470 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
c57d1d20ea
commit
c48205c99e
1 changed files with 6 additions and 1 deletions
|
@ -111,11 +111,16 @@ $data = '';
|
|||
foreach($iptc as $tag => $string)
|
||||
{
|
||||
$tag = substr($tag, 2);
|
||||
$data .= iptc_make_tag(2, substr($tag, 2), $string);
|
||||
$data .= iptc_make_tag(2, $tag, $string);
|
||||
}
|
||||
|
||||
// Embed the IPTC data
|
||||
$content = iptcembed($data, $path);
|
||||
|
||||
// Write the new image data out to the file.
|
||||
$fp = fopen($path, "wb");
|
||||
fwrite($fp, $content);
|
||||
fclose($fp);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
|
Loading…
Reference in a new issue