image resizing

From: Date: Tue, 03 Oct 2000 23:45:33 +0000
Subject: image resizing
Groups: php.general 
Request: Send a blank email to php-general+get-18490@lists.php.net to get a copy of this message
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),imagesy($src_img)); imagejpeg($dst_img, "images/temp.jpg"); ImageDestroy($dst_img); ImageDestroy($src_img); echo "<img src=images/temp.jpg>\n"; ?>

« previous php.general (#18490) next »