|  | Posted by NC on 09/08/06 15:16 
Mr Fred wrote:>
 > I wrote a class that does this, but it wasn't working
 > correctly.  It created all three images correctly, but
 > when I output the original image (which I had resized)
 > it kept overwriting the fullsize image with the resized
 > image.
 
 But this is exactly what you wrote:
 
 > $image_path = "E:\Eclipse\htdocs\core\outlineb.gif";
 > $im = imagecreatefromgif($image_path);
 ....
 > $new_image_path = str_replace(".","_fullsize.",$image_path);
 ....
 > imagegif($im_resized,$image_path);
 
 First, you create $im from $image_path, then you save $im_resized to
 $image_path instead of saving it to $new_image_path.  Rewrite the last
 line:
 
 imagegif($im_resized, $new_image_path);
 
 Cheers,
 NC
  Navigation: [Reply to this message] |