RE: [PHP] Thumbnails not generating
| From: | Chris Blake | Date: | Mon, 14 Apr 2003 13:37:02 +0000 |
| Subject: | RE: [PHP] Thumbnails not generating | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-143762@lists.php.net to get a copy of this message | ||
Howdy Mr. Schroebel
Still the same......both in the result and the HTML output.
Where can I find out what gd libraries I have installed ?
Could this be the problem, as it states in "PHP & MySQL Web Development"
that "...from PHP4.3, PHP comes with it`s own version of the gd
library...we recomment using gd2 as it is more stable..."
Been a whole day on this stuff and still nadda.......
Thanks
Chris
On Mon, 2003-04-14 at 15:22, Matt Schroebel wrote:
> Comment out the header() and see if there's an error message from php.
>
> > -----Original Message-----
> > From: Chris Blake [mailto:cblake@pbpc.co.za]
> > Sent: Monday, April 14, 2003 8:45 AM
> > To: Php-General
> > Subject: [PHP] Thumbnails not generating
> >
> >
> > Greetings learned PHP(eople),
> >
> > Objective : Create thumbnail from single image
> >
> > Code as follows :
> > ----------------------------------------------
> > <html>
> > <head>
> > <title>Thumbnails</title>
> > </head>
> > <body>
> > <?php
> > function thumb_image()
> > {
> > $new_w=100;
> > $new_h=100;
> >
> > header("Content-type: image/jpg");
> >
> > $dst_img=ImageCreate($new_w,$new_h);
> >
> > $src_img=ImageCreateFromJPEG("../graphics/stucco.jpg");
> >
> >
> > ImageCopyResized($dst_img,$src_img,0,0,0,0,$new_w,$new_h,Image
> > SX($src_img),ImageSY($src_img));
> >
> > return (ImageJPEG($dst_img));
> > }
> >
> > print '<table border="1">';
> > print '<tr>';
> > print '<td><img src="' . thumb_image() .
> > '"></img></td>';
> > print '</tr>';
> > print '</table>';
> > ?>
> > </body>
> > </html>
> > --------------------------------------------------------------
> > -------------
> >
> > Problem : Image not showing, output HTML looks like this :
> > ---------------------------------
> > <html>
> > <head>
> > <title>Thumbnails</title>
> > </head>
> > <body>
> > <table border="1"><tr>
> > ---------------------------------
> >
> > I`ve used various examples from php.net online manual
> > (imagecreatefromjpg --png--gif, ,ImageCopyResized,
> > ImageCreate et al) as
> > well as searching marc.theaimsgroup.com, and whilst they all look
> > similar, none of `em produce the required thumbnail.
> >
> > Using PHP 4.23.
> >
> > I`ve looked at functions to accomplish but being new to PHP I
> > get hella
> > lost when reading through them (100`s of lines of code, some
> > using MySQL
> > database). I got examples from www.seduction747.com but these are
> > copyright for commercial use.
> >
> > Please advise if I`m missing some vital points on creating thumbnails.
> > -
> > Chris Blake
> > Office : (011) 782-0840
> > Cell : 083 985 0379
> > Linux vs. Windows is a no win situation.
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
--
Chris Blake
Office : (011) 782-0840
Cell : 083 985 0379
Linux vs. Windows is a no WIN situation.