svn: /phpdoc/en/trunk/reference/image/functions/ iptcembed.xml

From: Date: Sun, 20 Sep 2009 08:50:18 +0000
Subject: svn: /phpdoc/en/trunk/reference/image/functions/ iptcembed.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-4956@lists.php.net to get a copy of this message
torben Sun, 20 Sep 2009 08:50:18 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=288470 Log: Allow the example for iptcembed to write its result to the original jpg file. Addresses bug #49595. Bug: http://bugs.php.net/49595 (Open) Incorrect example code Changed paths: U phpdoc/en/trunk/reference/image/functions/iptcembed.xml Modified: phpdoc/en/trunk/reference/image/functions/iptcembed.xml =================================================================== --- phpdoc/en/trunk/reference/image/functions/iptcembed.xml 2009-09-20 08:48:23 UTC (rev 288469) +++ phpdoc/en/trunk/reference/image/functions/iptcembed.xml 2009-09-20 08:50:18 UTC (rev 288470) @@ -111,11 +111,16 @@ 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>

« previous php.doc.cvs (#4956) next »