|
Posted by Jerry Stuckle on 10/06/06 20:49
Alexander Fischer wrote:
> Hello,
>
> I am writing a gallery script and use imagecreatefromjpeg and fpassthru
> to output images without any change to them (i.e., no thumbnail
> creation etc. - just deliver the image via the php script). However I
> note that the image creation is quite slow - the user can see that the
> image is created line-by-line, from top to bottom.
>
> Most likely this speed issue comes from PHP, since PHP is simply slower
> than C etc.
>
> However, if I use a "professional" script like e.g. phpThumb, I notice
> that the image display is much, much faster - almost as if I had the
> image displayed directly.
>
> What can I do to make my images faster? If there's nothing (simple)
> that I can do, is there at least a way to make the images as
> progressive JPGs, i.e. they don't build up from top to bottom
> line-by-line, but the image starts as a blurry image and gets sharper
> with time?
>
> Thanks!
> Alex
>
Alex,
Are you trying to resize the image in your html? If so, bad idea. This
will send the entire image file to the browser and display the behavior
you are experiencing. It also unnecessarily inflates the bandwidth
you're using.
"Professional" scripts create a thumbnail and send it instead. The size
difference is quite significant for larger pictures. And even for
smaller images the difference is usually quite noticeable.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|