hi redarrow, here is the code without classes please check it first. With red I marked the place where it stops. As you can see the parts of the program that has been done immediately before are exactly of the same nature that means that is they are OK, the next one should be OK as well. And I also tried to change the order of them which didn’t help: the program now stops after the same period of time but during other resampling. [color=navy][size=10pt] // Creating thumbnails print "<b>Creating Thumbnails...</b>"; $img = new ss_image($orig_img, "f"); $img->set_size(150, 150, "-"); $new_name = $reference; $img->output($where="../photos/preview_small/".$new_name, $what="c", $method="JPG"); print " <i>Done</i><br>"; // Creating intermediate size preview print "<b>Creating an intermediate size inamges...</b>"; $img1 = new ss_image($orig_img, "f"); $img1->set_size(550, 550, "-"); $img1->commit(); print " <i>Done</i><br>"; // Watermark for intermediate size image print "<b>Creating watermark...</b>"; $img1->watermark("../images/watermark_small.gif", $transparency=20, $x=20, $y=20, $makegray=true, $src_kind="f", $desired_w="*",$desired_h="*"); $img1->output($where="../photos/preview_big/".$new_name, $what="c", $method="JPG"); print " <i>Done</i><br>"; // Creating preview with original size and watermarks print "<b>Creating an origanal size previews...</b>"; $img2 = new ss_image($orig_img, "f"); $img2->set_size("*", "*"); $img2->commit(); print " <i>Done</i><br>"; // Watermark for original size previews $img2->watermark("../images/watermark.gif", $transparency=20, $x=20, $y=20, $makegray=true, $src_kind="f", $desired_w="*",$desired_h="*"); $img2->output($where="../photos/preview_orig_size/".$new_name, $what="c", $method="JPG"); // Creating cover and double versions $path = "../photos/cover/".$new_name; print "<b>Creating Cover size version...</b>"; if(!copy($orig_img, $path)) { print "Couldn't copy the cover size file..."; } else { print " <i>Done</i><br>"; } print "<b>Creating Double size version...</b>"; $path = "../photos/double/".$new_name; if(!copy($orig_img, $path)) { print "Couldn't copy the double size file..."; } else { print " <i>Done</i><br>"; } // Creating 1/2 (2250 x 1490 px) size version print "<b>Creating 2250 x 1490 px version...</b>"; $img2 = new ss_image($orig_img, "f"); $img2->set_size("2250", "2250", "-"); $img2->output($where="../photos/size_2250/".$new_name, $what="c", $method="JPG"); $img2->commit(); print " <i>Done</i><br>"; // Creating 1/4 (1500 x 1000 px) size version [color=red]print "<b>Creating 1500 x 1000 px version...</b>";[/color] >:( $img2 = new ss_image($orig_img, "f"); $img2->set_size("1500", "1500", "-"); $img2->output($where="../photos/size_1500/".$new_name, $what="c", $method="JPG"); $img2->commit(); print " <i>Done</i><br>"; // Creating 1/8 (750 x 496 px) size version print "<b>Creating 750 x 496 px version...</b>"; $img2 = new ss_image($orig_img, "f"); $img2->set_size("750", "750", "-"); $img2->output($where="../photos/size_750/".$new_name, $what="c", $method="JPG"); $img2->commit(); print " <i>Done</i><br>"; // Copy original images to a new location $path = "../photos/originals/".$new_name; print "<b>Coping Original images into new location...</b>"; if(!copy($orig_img, $path)) { print "Couldn't copy the original file..."; } else { print " <i>Done:</i>: <b><font color=\"green\" size=\"130%\">".$new_name."</font></b> was inserted<br>"; }[/size][/color]