PHP part2
■ このスレッドは過去ログ倉庫に格納されています
0079デフォルトの名無しさん
2005/10/27(木) 19:56:24if ($_GET["mode"]=="view") {
Header("Content-Type: image/jpeg");
$image = ImageCreateFromJpeg($url);
$sx = ImageSx($image);
$sy = ImageSy($image);
$imnew = ImageCreateTrueColor($width,$heigh);
ImageCopyResized( $imnew, $image, 0, 0, 0, 0, $width, $heigh, $sx, $sy);
ImageJpeg($imnew);
ImageDestroy($image);
}else{
print "<form action= image.php?mode=view method= post>";
print "<table>";
print "<tr><td>画像パス</td><td><input type= text name= url size= 40></td></tr>";
print "<tr><td>幅</td><td><input type= text name= width size= 40></td></tr>";
print "<tr><td>高さ</td><td><input type= text name= heigh size= 40></td></tr>";
print "<tr><td><input type= submit value= リサイズ ></td></tr>";
print "</table>";
print "</form>";
}
?>
がソースで携帯用画像リサイズスクリプトを製作してたんですが<img>で処理されていないため携帯&PCで画像の保存ができません。
どうにかformで送った値を$_GET["mode"]=="view"で受け取りリサイズをする→<img>で表示するにはどうすればいいでしょうか?
■ このスレッドは過去ログ倉庫に格納されています