Re: Serving an image

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>
> What is the diference between using imagecreatefrompng() and readfile()?
> Any performance improvement?
>
>
If you don't do any image minipulation, I would recommend readfile indeed.
The differences being that imagecreatefrompng load the image into memory,
ready to change it (overlay, rotate, crop, colours, .. anything), and
readfile just sends whatever file you point it to back to the browser (or
other output).

Then again, if you all you're doing is sending an image to the browser;
then why not do a redirect - or simply refer to the image directly?

Wouter

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux