Reply to Re: Help - Outputting Thumbnails

Your name:

Reply:


Posted by NC on 07/07/06 15:31

nickwired wrote:
>
> I have a few images users uploaded to a mySQL database.
> How can I out them as thumbnails.

Get the image from the database and use imagecopyresampled() to reduce
it.

http://www.php.net/imagecopyresampled

Additionally, consider storing thumbnails in the database along with
original images. Generating thumbnails dynamically is expensive in
terms of CPU usage. Many applications generate thumbnails as a part of
image upload procedure.

While you are in the considering mode, consider not storing images in
the database at all. Since not all browsers out there support <img
data="*"> tag, you need a separate script (and, hence, a separate
database connection) to render each image. So a page with five images
on it would create six database connections, which could have dire
performance consequences for a high-traffic Web site.

Cheers,
NC

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация