diff --git a/reference/image/functions/iptcembed.xml b/reference/image/functions/iptcembed.xml index fd22484bf1..e52992cd68 100644 --- a/reference/image/functions/iptcembed.xml +++ b/reference/image/functions/iptcembed.xml @@ -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); ?> ]]>