<?php function zdjecia_user($zdjecie, $ogl_id, $i){ //copy ($zdjecie, "o_images/".$ogl_id."_".$i.".jpg"); $source2 = imagecreatefromjpeg("o_images/".$ogl_id."_".$i.".jpg"); if(imagesy($source2)>150){ $new_width2 = 150; } else{ $new_width2 = imagesx($source2); $new_height2 = imagesy($source2); } $dest2 = imagecreatetruecolor($new_width2,$new_height2); imagecopyresampled($dest2,$source2,0,0,0,0,$new_width2,$new_height2,imagesx($source2),imagesy($source2)); imagejpeg($dest2,"o_images/min_".$ogl_id."_".$i.".jpg",50); imagedestroy($source2); imagedestroy($dest2); $source = imagecreatefromjpeg("o_images/".$ogl_id."_".$i.".jpg"); if(imagesy($source)>400){ $new_height = 400; } else{ $new_width = imagesx($source); $new_height = imagesy($source); } $dest = imagecreatetruecolor($new_width,$new_height); imagecopyresampled($dest,$source,0,0,0,0,$new_width,$new_height,imagesx($source),imagesy($source)); imagejpeg($dest,"o_images/".$ogl_id."_".$i.".jpg",50); imagedestroy($source); imagedestroy($dest); } ?>
Prosiłbym o pomoc jak to naprawić
