WHy isnt my image being saved
Posted: Mon Sep 01, 2008 6:35 am
i am trying to save an image that is produced by the Draw function using the imagepng() function but is not working can some one explain? the code runs fine no errors but the save part isn't working.
Thanks in advance.
Thanks in advance.
Code: Select all
if(isValid($value)==true){
Image_Barcode::draw($value, 'upca', 'png');
$barcode=ob_get_contents();
setcookie("barcode", $barcode, time()+3600);
ob_get_clean();
echo $barcode;
$png=".png";
$upc_image=$value.$png;
//$image = rename($barcode,$upc_image);
$file_location="htdocs/canada/0123454567890824.png";
imagepng($image,$file_location,0,NULL);