View file forum/imgecreate.php

File size: 625B
<?php
header('Content-type: image/jpeg');


{
$im="smilies/1.jpg";
list($width, $height) = getimagesize($im);
echo "<br/>$width ";
list($width, $height) = getimagesize($im);
$imagetip=getimagesize($im);
if ($imagetip[2]=="1")
      $s_im=imagecreatefromgif($im);
      if ($imagetip[2]=="2")
      $s_im=imagecreatefromjpeg($im);
      if ($imagetip[2]=="3")
      $s_im=imagecreatefrompng($im);
      $d_im=imagecreatetruecolor(40, 40);
      imagecopyresampled($d_im, $s_im, 0, 0, 0, 0, 40, 40, $width, $height);
      imagejpeg($d_im);





























}
?>