tags:

views:

12

answers:

0

I've 4 source images; foto1.jpg, foto2.jpg, foto3.jpg, foto4.jpg

phpthumb generates:

  1. foto1 with name foto1_160.jpg
  2. foto1 again with name foto2_160.jpg !!
  3. foto3 with name foto3_160.jpg
  4. foto3 again with name foto4_160.jpg !!
  5. etc.

Basically it outputs previous rendered thumb once more instead of actual thumb, but does output with correct file name.

code snippet:

  1. foreach($pics as $fname) {
  2. $phpThumb->setSourceFilename($srcdir.$fname);
  3. ...
  4. if($phpThumb->GenerateThumbnail()) {
  5. $output_size_x = ImageSX($phpThumb->gdimg_output);
  6. $output_size_y = ImageSY($phpThumb->gdimg_output);
  7. if($phpThumb->RenderToFile($output_filename)) {
  8. echo 'Successfully rendered";
  9. }

phpThumb: 1.7.9-200805132119 PHP: 5.3.0