You are here: Re: imagecreatefromjpeg() uses too much memory « All PHP « IT news, forums, messages
Re: imagecreatefromjpeg() uses too much memory

Posted by Diogo on 03/30/06 12:17

the problem is not how big in bytes your jpeg is but how large its
dimensions are.

when you imagecreatefromjpeg() the function sort of "decode" and stores
it n memory as "raw data" (well not exactly but as big as it'd be) then
you can really get huge usage with files larger than 1024x768 lets say.

i'd say that even if you change your ISP for someone with a bigger
memory limit it'd crash anyway with GD - at least when someone uploads
a big enough picture.

have you considering limiting the dimensions of the picture? it'll be
boring for the users tho :P

it will be almost impossible to use external features such as
Imagemagick instead of gd on a shared host.

 

Navigation:

[Reply to this 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

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