zkusil jsem zakomponovat do svého
<?php
....
...
public function save_photo($tmp_name,$name,$type,$size){
$image_info = getimagesize($tmp_name.'/'.$name);
$image_info_big = $this->resize($image_info,$this->max_width,$this->max_height);
$image_info_small = $this->resize($image_info,150,150);
$data = file_get_contents($tmp_name.'/'.$name);
$file_name = date('d_H_i_s').'.jpg';
$small_photo['name'] = 's'.$file_name;
$small_photo['link'] = $this->photo_dir. $small_photo['name'];
$holder = imagecreatetruecolor(150, 150);
imagecopyresampled($holder, $tmp_name.'/'.$name, 0, 0, 0, 0, 150, 150, $image_info[0], $image_info[1]);
imagejpeg($holder, $this->photo_dir. $small_photo['name'], 75);
....
Warning: imagecopyresampled() expects parameter 2 to be resource, string given in .....\Fotogalery\UploadManager.php on line 95