RE: [PHP] image resizing

From: Date: Wed, 04 Oct 2000 00:26:48 +0000
Subject: RE: [PHP] image resizing
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-18499@lists.php.net to get a copy of this message
I'm confused. If you create an image from a file, do a copyresize to a second image, and output the second image, how are you creating copies of the images on your server? I thought the php images were all "in memory" structures? - Mark -----Original Message----- From: webmaster@videosecrets.com [mailto:webmaster@videosecrets.com] Sent: Tuesday, October 03, 2000 4:46 PM To: php-general@lists.php.net Subject: [PHP] image resizing after an ungodly amount of time, i have finally figured out and set up on my server to use image manipulation for jpeg images. after i use imagecopyresized, i use imagejpeg to create a new, smaller jpeg. then i display it on the web for all the world to see. now, is there a way to resize an image and display it on the web without actually making a copy of the image on the server. it seems to me that there should be a way to do this, but i believe there is not. the reason why i ask this is because there will be several sites in our company that will call in images dynamically (from an ldap server) and display them as icons. the size of the icons may vary from site to site, and we have many sites. i would rather not flood my server with a bunch of icon images. if you can help, please reply to this email. the code that i am currently using is as follows: <? $imagefile = "images/990209_005.jpg"; $src_img = imagecreatefromjpeg($imagefile); $new_w = imagesx($src_img)/4; $new_h = imagesy($src_img)/4; $dst_img = imagecreate($new_w,$new_h); imagecopyresized($dst_img,$src_img,0,0,0,0,$new_w,$new_h,imagesx($src_img),i magesy($src_img)); imagejpeg($dst_img, "images/temp.jpg"); ImageDestroy($dst_img); ImageDestroy($src_img); echo "<img src=images/temp.jpg>\n"; ?>

« previous php.general (#18499) next »