I can resize the jpeg file with below script, i.e. jpeg function works on my machine. I am using Apache 2.0.3.9 with PHP 4.2.2, i forget which dll i uncommented. either php_gd or php_gd2. ------------------------------------------------- <? $imgsize = getimagesize("10.jpg"); //Initialize the image. $image = imagecreatefrompng("10.jpg");
$newimage = imagecreate(100, 100); //Allocate some nice black space. $black = imagecolorallocate($image, 0,0,0); //Resize the old image into the new image, //specifying starting points and dimensions. imagecopyresized($newimage, $image, 0, 0, 0, 0, 100, 100, 200, 200); //Get rid of the old image. imagedestroy($image); //Now, the message -- the second argument, //a number from 1-5, specifies a built-in font. //Or you can load your own with ImageLoadFont(). //We'll put it in the upper right with coordinates of 10,10. imagestring($newimage, 2, 10, 10, "Copyright 2001", $black); //All righty, let's wrap things up here. header("Content-type: image/jpeg"); imagepng($newimage); imagedestroy($newimage); ?> ---------------------------------------------------------- "Sascha Braun" <[EMAIL PROTECTED]> ¼¶¼g©ó¶l¥ó·s»D :[EMAIL PROTECTED] > I believe the jpeg funnktions don't work on a windows system. The Gifs don't > do either because they aren't implemeted too. > > Please look at this Library. It's very nice but I don't get it working and > the guy who made it don't know either, why it's not working on my system. > Must be something about jpeg librarys and so on. > > Schura > > PS.: Examples at the end of the file. > > -----Ursprüngliche Nachricht----- > Von: Nicholas Mercier [mailto:[EMAIL PROTECTED]] > Gesendet: Dienstag, 13. August 2002 10:35 > An: [EMAIL PROTECTED] > Betreff: Re: [PHP] image function > > > At 09:50 PM 8/12/2002 +0800, you wrote: > Jay, > > I would recommend uncommenting the php_gd2.dll extension. > > Gd2 contains some functions that GD lacks and is over all better in my > opinion. > However, they are correct that you do NOT need to recompile when running > PHP on a Windows Platform. Simply change php.ini to include the added > extension and then restart your apache server. > > Nick > > > >Thank you Jay, Yup my apache is on Windows : ) > >Let's me try first. > >"Jay Blanchard" <[EMAIL PROTECTED]> ¼¶¼g©ó¶l¥ó·s»D > >:002301c24201$b28caf00$[EMAIL PROTECTED] > > > [snip] > > > I known i need to install a lot of staffs to get all the functions > >works(GD > > > Lib, FreeType Lib, libjpeg, libpng, zlib........etc etc). > > > But i only need a few of them, so if i just load the php_gd.dll, what > > > functions included?? I canr found any information about that. > > > And one more, does php_gd2.dll also a GD lib? > > > [/snip] > > > > > > The DLL is a Windows library AFAIR, and contains the GD functions when > > > included on a Windows server. You do not have to enable this extension > on > >an > > > Apache server (unless it is Apache on Windows). You just have to make > sure > > > that PHP is compiled with all of the proper libraries for your use of > GD. > > > > > > As for the second DLL, I am not sure. I haven't done a lot of Windows GD > > > installations, it does not look familiar. > > > > > > HTH! > > > > > > Jay > > > > > > > > > > > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php