Re: Creating Image...
| From: | hugh danaher | Date: | Wed, 31 Jul 2002 20:22:29 +0000 |
| Subject: | Re: Creating Image... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-110573@lists.php.net to get a copy of this message | ||
You might also want to add a "quality" factor to the imagejpeg() function if
the image "as is" looks a bit ratty.
$factor="100" // or another suitable number between 100 and 0
imagejpeg($im, "test/im.jpg",$factor);
hope this helps.
Hugh
----- Original Message -----
From: "Andrew Chase" <andrew.chase@valleypres.org>
To: <php-general@lists.php.net>
Sent: Wednesday, July 31, 2002 1:10 PM
Subject: RE: [PHP] Creating Image...
> To write a GD image to disk as a jpeg, do this instead:
>
>
> $im = imagecreate(50,100);
>
> imagejpeg($im, "test/im.jpg");
>
>
> You don't need to use file handlers. Of course, without doing anything
like
> adding text or lines to $im, it will just be written to disk as a blank
> image. :)
>
> -Andy
>
> > -----Original Message-----
> > From: mp [mailto:lietuva@xxx.lt]
> > Sent: Wednesday, July 31, 2002 11:11 AM
> > To: php-general@lists.php.net
> > Subject: [PHP] Creating Image...
> >
> >
> > I want to create simple image...
> > I execute this script:
> >
> > $im = imagecreate (50, 100);
> > $fp = fopen("test/im.jpg","w");
> > fwrite($fp, imagegd($im));
> > fclose($fp);
> >
> > But there is some problems about this...
> > Could somebody help me?
> > Could somebody help me?
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>