View Full Version : Files blink on display
gorilla1
10-13-2002, 04:55 AM
I have a directory of gif files and I index into it and display the file using readfile. Works fine. Now I would like to add a border or background, so I echo"<img src=..." and a little html instead of the readfile. Works, too, but one can see first the a small box flash in the browser and then the full image fill in, if one watches closely enough. Is there a way to avoid this effect?
G
firepages
10-13-2002, 07:51 AM
sorry dude but I dont quite get what you mean ? - got a URL ?
gorilla1
10-13-2002, 01:42 PM
I don't have a server I can put this on. But I have seen the effect frequently with php slideshows on the web. Here is one (which I dont know is actually php, but it is precisely the same effect). Sorry for subject matter, but it is the first I found:
<fp_edit>Sorry Gorrilla but I had to loose the link ;)</fp_edit>
Ah, sorry. How about this one?
http://www.artring.co.uk/photography/?a=29966&d=0&n=03
By the way, just stumbled on this function, and I'm wondering if specifying the image size up front might make a difference: getimagesize
G
firepages
10-13-2002, 02:21 PM
I am still not 100% sure about what you mean by a 'flash' as such, though if you mean when viewing the larger image then maybe I do, hard to tell, in the case of the gallery you linked to I think its the border of the image resizing itself to fit the picture ???
the only thing I can think of is are you setting the width and height attributes of your image tags ? if nothing else the page will load faster with them set which may help some + the image border should already be set at the correct width & height, though whether this is really the problem I dont know.
you can use getimagesize() to grab the width and height attributes so if
$yaks=getimagesize('./some/image.jpg');
then $yaks[3]; contains the ` width="300" height="300" ` string.
Whether you can use that in conjunction with readfile() I am not sure ?
gorilla1
10-13-2002, 02:26 PM
Yes, Firepages, that is it exactly. OK, I will try that. Thnx.
G
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.