As per an assignment given to me, I am trying to see the effects of the following two function of php on a image file 1. imagecreatefromjpeg 2. imagejpeg
Ben bir html kullanarak dosya upload ve sonra benim php kod şöyle görünür:
<?php
try{
if(!$image=imagecreatefromjpeg('zee1.jpg')){
throw new Exception('Error loading image');
}
// create text color for jpg image
if(!$textColor=imagecolorallocate($image,0,255,0)){
throw new Exception('Error creating text color');
}
// include text string into jpg image
if(!$text=imagestring($image,5,10,90,'This is a sample text
string.',$textColor)){
throw new Exception('Error creating image text');
}
header("Content-type:image/jpeg");
// display image
imagejpeg($image, 'zee1After.jpg');
// free up memory
imagedestroy($image);
}
catch(Exception $e){
echo $e->getMessage();
exit();
}
?>
Ben bunu Ama, ben aşağıdaki çıktıyı alıyorum:
Ölümcül hata: tükenmiş 33554432 bayt İzin bellek boyutu C (10.368 bayt ayırmaya çalıştı): \ Users \ zee \ Documents on line 3 Flex Builder 3 \ BULUTU \ bin-debug \ \ upload_file.php
Orijinal görüntünün boyutu: 5136 KB php çalıştırdıktan sonra yukarıdaki hata verir.
Ama boyutu ile diğer görüntü için çalışırsanız: Çalışır 2,752 KB ..
Can someone please help me with this. Zeeshan