By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,614 Members | 1,674 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,614 IT Pros & Developers. It's quick & easy.

Work with BIG picture

P: n/a
Hi all
i have a script where you simply upload a picture and with $image =
imagecreatefromjpeg create an object to be able to work with it.
If i upload small picture ( less then 2M )it work fine and i'm able to
resize crop end save but with bigger picture php generate and error of
memory_limit on the line where is "$image =
imagecreatefromjpeg($_FILES['imgfile']['tmp_name']);"
my php.ini memory_limit is set to 40M;
i have to be able to upload jpg on hight resolution up to 5-6 Mb
any idea ?
Feb 26 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Daniele wrote:
[...] i'm able to resize crop end save but with bigger picture php
generate and error of memory_limit on the line where is "$image =
imagecreatefromjpeg($_FILES['imgfile']['tmp_name']);"
any idea ?
The PHP image library loads the entire *uncompressed* image into memory.
That means sh*tloads of memory for large images.

Consider using memory-efficient external tools to accomplish this task, such
as the ImageMagick suite.

--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

Now listening to: Intuit - Bar Lounge Classics Vol. 1 CD 10 - [13] O
Preguicoso (6:23) (95%)
Feb 26 '07 #2

P: n/a
Iván Sánchez Ortega wrote:
Daniele wrote:
>[...] i'm able to resize crop end save but with bigger picture php
generate and error of memory_limit on the line where is "$image =
imagecreatefromjpeg($_FILES['imgfile']['tmp_name']);"
>any idea ?

The PHP image library loads the entire *uncompressed* image into memory.
That means sh*tloads of memory for large images.

Consider using memory-efficient external tools to accomplish this task, such
as the ImageMagick suite.
thanks
not sure if i can install on my server
can i install with out be root ? just for my user ? i do have ssh access
Feb 26 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.