Forum Moderators: coopster

Message Too Old, No Replies

PHP Image Functions

         

artie2004

5:09 pm on Mar 26, 2005 (gmt 0)

10+ Year Member



Hello. Does anyone know why i am getting the following error when all of the other php functions are working.

Fatal error: Call to undefined function: scaleimage() in /usr/home/prescrip/public_html/mdsapp/pharmagroup/labelbuffer.php on line 8

<?php
// File and rotation
$filename = '/usr/home/prescrip/www/mdsapp/pharmagroup/labels/456326589.png';
// Content type
//header('Content-type: image/png');
// Load
//$source = imagecreatefrompng($filename);
$source = scaleImage(550,400,$filename, $quality=50);
// Rotate

$ro = imagerotate($source, 90,0);

imagedestroy($source);

//$source = scaleImage (550,400,$filename, $quality=50);
//$ro = imagerotate($source, 2,0);
//imagepng($ro);

//echo "HERE". $rotate;

// Output
imagepng($ro);

?>

dreamcatcher

5:23 pm on Mar 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi artie2004,

The clue is in the error message. The code is saying that it cannot find the scaleImage() function. Do you know where this function is supposed to be located?

dc

artie2004

5:29 pm on Mar 26, 2005 (gmt 0)

10+ Year Member



I got this code on the web. I assumed that
scaleimage() was part of PHP GD library functions.

dreamcatcher

6:07 pm on Mar 26, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, I may be wrong, but it looks like someone wrote a custom function? I`ve not seen that function used before.

Hopefully either Coopster, Ergophobe, jatar_k or mincklerstraat will be along soon to sort you out. :)

dc

coopster

8:05 pm on Mar 26, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



If that's a PHP library function it is new to me. I'm thinking dc is correct in that it is more than likely a user-defined function. A quick search of the term shows lots of activity on the imagemagick.org forum though.