header('Content-Type: image/jpeg'); $w=100; $h=100; $filename = 'picture.jpg'; for($i=0;$i<10;$i++){ $rfname="images/re$i.jpg"; resize($filename,$w,$h,$rfname); } function resize($filename,$w,$h,$rfname){ list($width, $height) = getimagesize($filename); $image_p = imagecreatetruecolor($w,$h); $image = imagecreatefromjpeg($filename); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $w, $h, $width, $height); imagejpeg($image_p,'', 100); imagejpeg($image_p,$rfname); }
Html, JAVA,DOTNET,Javascript, PHP, and JQuery Scripts and its issues with solutions
Wednesday, 3 September 2014
Resize image by using PHP GD functions
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment