Connecting Tech Pros Worldwide Help | Site Map

Work with BIG picture

  #1  
Old February 26th, 2007, 12:35 PM
Daniele
Guest
 
Posts: 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 ?
  #2  
Old February 26th, 2007, 12:55 PM
=?ISO-8859-15?Q?Iv=E1n_S=E1nchez_Ortega?=
Guest
 
Posts: n/a

re: Work with BIG picture


Daniele wrote:
Quote:
[...] 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']);"
Quote:
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%)
  #3  
Old February 26th, 2007, 01:05 PM
Daniele
Guest
 
Posts: n/a

re: Work with BIG picture


Iván Sánchez Ortega wrote:
Quote:
Daniele wrote:
>
Quote:
>[...] 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']);"
>
Quote:
>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
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Big picture question - Web sites vs Web Applications =?Utf-8?B?Qi4gQ2hlcm5pY2s=?= answers 7 June 27th, 2008 09:10 PM
Big-Picture Question (Web Services, RegNow) Jonathan Wood answers 23 November 25th, 2006 06:25 PM
Fit large picture in PictureBox Dick answers 6 November 21st, 2005 01:53 AM
Swap Image does not work with IE Dietmar Prantner answers 3 July 23rd, 2005 02:38 PM