Re: Image aliasing

From: Date: Mon, 24 Jun 2002 23:06:44 +0000
Subject: Re: Image aliasing
Groups: php.general 
Request: Send a blank email to php-general+get-103691@lists.php.net to get a copy of this message
morgan- is there any way you can have those img tags (the ones with the height and width) changed to reference a php script? you could write a script that reads in the image they're requesting, and takes a height and width as inputs, then uses php commands like imagecopyresampled() or imagecopyresized() to dynamically output a resized image? maybe this would be too much load on your server, but it sure would cut down on the download time, and would almost *positively* give you better image quality. might look something like this <img src="http://yourserver.com/scriptpath/thumbnail.php?height=100&width=100" > with a script something to the effect of thumbnail.php: (assuming the file is a jpeg) <? $bigimage=imagecreatefromjpeg("/path/filename.jpg"); $smallimage=imagecreate(); imagecopyresized($smallimage,$bigimage, etc....); imagejpeg($smallimage); ?> jerome
From: "Morgan Grubb" <morgan@autobuy.co.nz> Reply-To: "Morgan Grubb" <morgan@autobuy.co.nz> Morning, I'm wondering if anybody has ever figured out a way to get around the absolutely abysmal way that Internet Explorer resizes images? The problem is that the person I'm supplying the images to refuses to use two copies (a small one, and a large one) and instead uses one (just the large one) and when he needs a small representation of it he slaps the large image in and sets the width and height tags. The problem comes in when I'm trying to supply him with good looking images. Sure, the large image looks fine, but that smaller image gets aliased to hell and back. Can the large image be recompressed in such a way that it doesn't noticeably damage the large version, but improves how it looks when arbitrarily shrunk in IE?
_________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com

« previous php.general (#103691) next »