jpeg_quality(100); if ($parametr == "w"){ if ($size > $stredWidth): $size = $stredWidth; endif; $thumb->size_width($size); // set width for thumbnail with 100 pixels } elseif ($parametr == "h"){ if ($size > $stredHeight): $size = $stredHeight; endif; $thumb->size_height($size); } elseif ($parametr == "auto"){ $thum->size_auto($size); } $thumb->show(); // Soubor neexistuje, existuje aspon adresar? if(!file_exists($folder_thumb.$parametr.$size)) { // Adresar neexistuje, vytvor ho $oldumask = umask(0); mkdir($folder_thumb.$parametr.$size, 0777); umask($oldumask); } if(file_get_contents($folder_zdroje.$filename)) { $thumb->save($folder_thumb.$parametr.$size."_".$filename); // save my thumbnail to file "huhu.jpg" in directory "/www/thumb chmod($folder_thumb.$parametr.$size."_".$filename,0666); } } // see online : http://kentung.f2o.org/scripts/thumbnail/sample.php ?>