473,395 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Work with BIG picture

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
2 1179
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Mark Constant | last post by:
I have a xslt file and it keeps giving me an EOF error when it reaches the point <xsl:for-each select="lc:Entertainment/lc:$Hardware"> and <xsl:for-each select="lc:Entertainment/lc:$Hardware"> ...
3
by: Dietmar Prantner | last post by:
Hello, I tried a Javascript on my homepage that works fine on Netscape, works nearlyx normal on Opera but does not work at all on Internet Explorer. Is there anybody out there who can help? I...
16
by: Geoff Cox | last post by:
Hello, Can someone please explain how this preload images function works? It is the picture.onload = preload_imgs; which I don't understand.
2
by: Lyn | last post by:
I am trying to embed a picture into a Bound Object Frame (Me!Photograph) with the following code which is based on MS article http://support.microsoft.com/?id=158941: strPathname =...
6
by: John Ortt | last post by:
Hi there everyone, I have a part info form which has a faded image of our company logo as a background. I want to replace the faded image with a bright red warning image on items which have run...
6
by: Jeff | last post by:
Hey (and thank you for reading my post) In visual web developer 2005 express edition I've created a simple website project.. At this website I want users who register to be able to upload a...
3
by: Tarik Monem | last post by:
Here is the html code <?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html lang="en" xml:lang="en"...
27
by: DavidPr | last post by:
I've been working on this script all day with no luck at all. I have to successfully test both parts of this script in order to finish this project. I haven't tested the delete part yet, because I...
2
by: Pat | last post by:
Hi, I have a picture somewhere under 'Program Files' Folder. When I assign ImageURL to a Hyperlink it does nothing. It does not read the picture file. But when I copy that picture to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.