I want to cut a picture from Google Charts.
My Code is:
$org_img = "http://chart.googleapis.com/chart?chxl=0:|14%3A00|17%3A00|1:|11|11|11|2:|+&chxp=0,0,1|1,0,1,2&chxr=0,0,8|1,0,8|2,-5,25.5&chxs=0,676767,10,-1,t,FFFFFF|1,676767,10.1,-1,_,676767|2,676767,0,0,_,676767&chxtc=0,2&chxt=x,t,y&chs=515x120&cht=lc&chco=FFCC00&chds=-40,40&chd=t:11,11,11,11,11,11,11,11&chdlp=l&chg=-1,-1,0,1&chls=4&chm=B,FFCB0033,0,0,0,1";
$crop = 40;
$xy_org = getimagesize($org_img);
$x_new = $xy_org[0] - $crop;
$y_new = $xy_org[1] ;
$tmp_img = imagecreatetruecolor($x_new, $y_new);
$src_img = imagecreatefrompng($org_img);
imagecopy($tmp_img, $src_img, 0, 0, $crop, $crop, $x_new, $y_new);
header ("Content-type: image/png");
echo "<img src = '".imagepng($tmp_img, '', 100)."'>";
imagedestroy($tmp_img);
The Problem now is, that i allways get an error in the browser: Resource interpreted as Document but transfered with MIME Type image/png.
Can anybody help me to cut an image ?
I acctually want to cut at the beginning 2 pixel and at the end 2px.
Thanks for your answer.