$in = imagecreatefrompng("http://www.cbc.name/yinan_test/scan/".$file);
$out = imagecreate(670,110);
imagecopyresized ($out, $in, $ix1, $iy1, $ix2, $iy2, 670, 110,700,150);
$red =imagecolorallocate ($out,255,120,120);
imagefilledrectangle($out, $lx1, $ly1, $lx2, $ly2, $red)...