All the image functions are working ok in my scripts so I decided to use classes for these.
I have a file which contains the GenerateImage class.
The class has - function Display($filename)
Code: Select all
function Display($filename)
{
.
.
.
.and finally
imagejpeg($tmp_img);
// I tried returning imagejpeg($tmp_img),$tmp_img
}Code: Select all
$AlbumThumb=new GenerateImage("somearg");1>
Code: Select all
print('<TR><TD ALIGN=center><IMG SRC='.$AlbumThumb->Display($rowї'url']).'></TD></TR>');Code: Select all
print('<TR><TD ALIGN=center>'.$AlbumThumb->Display($rowї'url']).'</TD></TR>');Code: Select all
$AlbumThumb->Display($rowї'url']);ÿØÿàJFIFÿþ>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality ÿÛC
........
ÿñïþµTÝŒ‚y|ç ·ÆsERÿÙ
I also tried adding header("Content-type: image/jpeg"); in the class/file.
Any idea how to get this working in class ?
Thanks