Jump to content
php.lv forumi

Jpeg image thumbnails


Robis

Recommended Posts

Sveiki!

Manis izveidotais image thumbnailu veidoshana skripts http://paste.php.lv/949

(ir iznjemts header("Content-type: image/png")), tachu, veicot sho skriptu (kursh atrodas kaa php fails pict_thumbs.php ieksh /pictures/) un noraadot pareizu image/jpeg failu (.jpg), man raada shaadu erroru:

<br />

<b>Fatal error</b>: Allowed memory size of 8388608 bytes exhausted at (null):0 (tried to allocate 9088 bytes) in <b>/home/virtual/site/var/www/html/pictures/pict_thumbs.php</b> on line <b>32</b><br />

 

Vai tas ir taapeec, ka bildes, kuraam meegjinu uztaisiit thumbus ir apmeeram 700Kb lielas un 2272x1704 pixelju izmeeri??? Ko tad lai es daru ar shiim bildeem, kaa lai samazina???

Edited by Robis
Link to comment
Share on other sites

+ piebildiishu, ka man shis ini_set("memory_limit", "12M"); atgriezh FALSE.

Nesaprotu, kaa lai mainu ini? Bet uz publiskajiem serveriem shii php.ini konfiguraacija ir uz visu serveri un saitiem, vai arii uz katra saita atsevishkji?

Link to comment
Share on other sites

Hei, paskat, tikai izmainiita php.ini konfiguraacija uz 16M, tachu tik un taa - tagad jau vinjsh raada shaadu kljuudu!!!

 

ini_set failed!<br />

<b>Fatal error</b>: Allowed memory size of 16777216 bytes exhausted at (null):0 (tried to allocate 9088 bytes) in <b>/home/virtual/site/var/www/html/pictures/pict_thumb.php</b> on line <b>42</b><br />

 

Es meegjinaaju atkal ar to pashu bildi!

Cik tad tur iisti atminjas vajag???

 

PLEASE HELP!!!

Link to comment
Share on other sites

Nu pamēģini pielikt tos

ImageDestroy($destimg);

ImageDestroy($srcimg);

funkcijas (kā tev viņa īsti saucās "createImageThumbnail" vai "doImageThumbnail" ???) beigās pēc imagu izvadīšanas.

 

Pamēģini ar 30k bildīti. Vai tad rodas problēmas?

Link to comment
Share on other sites

×
×
  • Create New...