Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> KBopot z GD2
wirtus
post
Post #1





Grupa: Zarejestrowani
Postów: 67
Pomógł: 0
Dołączył: 5.05.2003
Skąd: Warszawa

Ostrzeżenie: (0%)
-----


Witam !

Wiem, ze temat GD2 byl juz poruszany na forum wielokrotnie, lecz na moj problem odpowiedzi na nim nie znalazlem.

A problem jest taki:

Mam zainstalowana na freebsd biblioteke w wersji 2.0.15
php w wersji 4.3.3RC1

i mam nastepujace komunikaty:

Call to undefined function: imagejpeg() in /var.........
Call to undefined function: imagecreatefromjpeg() in /var.........

itp.... Z czym to moze miec zwiazek ?

to jest skrypt, ktorego uzywam (znaleziony zreszta na tym forum):

[php:1:6db098dd40]<?php
function image_resize($source, $output, $width, $height){

if(!$quality=@func_get_arg(4)){$quality=100;}

$size=getimagesize("$source");
if($size[2]==1){$image1=ImageCreateFromGif("$source");}
elseif($size[2]==2){$image1=ImageCreateFromJpeg("$source");}
elseif($size[2]==3){$image1=ImageCreateFromPng("$source");}

if(isset($width) && $height==0){
if($width<$size[0]){
$a=$size[0]/$width;
$height=$size[1]/$a;
}else{
$width=$size[0];
$height=$size[1];
}
}

if($width==0 && isset($height)){
if($height<$size[1]){
$a=$size[1]/$height;
$width=$size[0]/$a;
}else{
$width=$size[0];
$height=$size[1];
}
}

$image2=imagecreate($width, $height);

imagecopyresized($image2, $image1, 0, 0, 0, 0, $width, $height, $size[0], $size[1]);

header ("Content-type: image/jpeg");

Imagejpeg($image2, "", $quality);

}

image_resize("okladki/103.jpg", "103_mini.jpg", "120", "", "75");
?>[/php:1:6db098dd40]
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 24.08.2025 - 00:07