Hi - I got to the bottom of this a couple of weeks ago so its still fresh :

Once you have GD installed, try this

$newwidth=120;
// New image width
$newheight=150;
// New image height
$imgurl="/path/to/your/image/file.jpeg";
// Wherever you have stored your image, eg /tmp
$size=GetImageSize($imgurl);
  // Acquire image width & height from image file : this is an array 
(0=width, 1=height)

$im1=ImageCreateFromJPEG($imgurl) or die("Could not create image");
// Get image identifier or quit
$im2=ImageCreate($newwidth,$newheight);
// Make new blank image identifier to receive resized image
ImageCopyResized($im2,$im1,0,0,0,0,$newwidth,$newheight,$size[0],$size[1]);
// Does the hard work
header("Content-type:image/jpeg");
// Tell browser the next data is an image
ImageJPEG($im2);
// Actually output the image you just created


Cheers,
Neil Smith.


At 17:03 20/09/2002 +0000, you wrote:
>Message-ID: <[EMAIL PROTECTED]>
>Date: Fri, 20 Sep 2002 07:56:49 -0700 (PDT)
>From: kivanc urgancioglu <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>MIME-Version: 1.0
>Content-Type: text/plain; charset=us-ascii
>Subject: thumbnails
>
>Hi,
>How can I create thumbnails from image files like jpeg
>,gif etc.I don't know how to install gd library in
>windows.Can anyżne help me?


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to