<?php function resizeImage($source, $max_x, $max_y, $save_image, $jpeg_quality = 100) { $img_src = imagecreatefromjpeg($source); $image_x = imagesx($img_src); $image_y = imagesy($img_src); if($image_x > $image_y) // Landscape { $ratio_x = ($image_x > $max_x) ? $max_x/$image_x : 1; $ratio_y = $ratio_x; $move = 'y'; } else // Portrait { $ratio_y = ($image_y > $max_y) ? $max_y/$image_y : 1; $ratio_x = $ratio_y; $move = 'x'; } $new_x = $image_x*$ratio_x; $new_y = $image_y*$ratio_y ; $move_x = ($move == "x") ? ($max_x-$new_x)/2 : 0; $move_y = ($move == "y") ? ($max_y-$new_y)/2 : 0; $new_img = imagecreatetruecolor($max_x, $max_y); $background = imagecolorallocate($new_img, 255, 255, 174); imagefill($new_img, 0, 0, $background); imagecopyresampled($new_img, $img_src, $move_x, $move_y, 0, 0, $new_x, $new_y, $image_x, $image_y); imagejpeg($new_img, $save_image, $jpeg_quality); } ?>
i wywala mi taki blad
Fatal error: Call to undefined function imagecreatefromjpeg() in /home/users/spwojslawice/public_html/pliki/aktualnosci/formularz_przetwarzania_danych.php on line 7
co sie dzieje bo na moim lokalnym serwerze wszystko dziala