473,406 Members | 2,208 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,406 software developers and data experts.

resize image and memory limits

Hi all,

I've to resize uploaded images with the "imagecopyresampled" but when I've
images quite large (common those days) I reach the 16mb limits of the ISP.

How can I fix this ? I absolutely need to resize such images.

Bob
Jun 29 '07 #1
6 3304
Bob Bedford wrote:
Hi all,

I've to resize uploaded images with the "imagecopyresampled" but when I've
images quite large (common those days) I reach the 16mb limits of the ISP.

How can I fix this ? I absolutely need to resize such images.

Bob

Iirc Imagemagick handles these resizes more memory efficiently

Check Imagick in php>5

Arjen
Jun 29 '07 #2
"none" <""arjen\"@(none)"a écrit dans le message de news:
46***********************@news.wanadoo.nl...
Bob Bedford wrote:
>Hi all,

I've to resize uploaded images with the "imagecopyresampled" but when
I've images quite large (common those days) I reach the 16mb limits of
the ISP.

How can I fix this ? I absolutely need to resize such images.

Bob
Iirc Imagemagick handles these resizes more memory efficiently

Check Imagick in php>5
Thanks for replying Arjen,

for what I've readed, it needs to install something on the server. I've no
access to the server neither command line or exec functions.
It's there any way to use it or maybe I'm wrong (I've checked the site
http://www.imagemagick.org/ and http://www.magickwand.org/)

Bob
Jun 29 '07 #3
Bob Bedford wrote:
"none" <""arjen\"@(none)"a écrit dans le message de news:
46***********************@news.wanadoo.nl...
>Bob Bedford wrote:
>>Hi all,

I've to resize uploaded images with the "imagecopyresampled" but when
I've images quite large (common those days) I reach the 16mb limits of
the ISP.

How can I fix this ? I absolutely need to resize such images.

Bob
Iirc Imagemagick handles these resizes more memory efficiently

Check Imagick in php>5
Thanks for replying Arjen,

for what I've readed, it needs to install something on the server. I've no
access to the server neither command line or exec functions.
It's there any way to use it or maybe I'm wrong (I've checked the site
http://www.imagemagick.org/ and http://www.magickwand.org/)

Bob

see phpinfo() and check for imagick and on the shell try #locate convert
to see if imagemagicks convert has been installed.

Otherwise tell your provider he's an idiot and ask for imagemagick :-)

Arjen
Jun 29 '07 #4

"Bob Bedford" <bo*@bedford.comwrote in message
news:46**********************@news.sunrise.ch...
Hi all,

I've to resize uploaded images with the "imagecopyresampled" but when I've
images quite large (common those days) I reach the 16mb limits of the ISP.

How can I fix this ? I absolutely need to resize such images.

Bob
Hi Bob,

maybe you can resize them first to an intermediate size using
'imagecopyresized', hoping that resizing takes up less memory than
resampled.

Richard


Jun 29 '07 #5

"Richard" <root@localhosta écrit dans le message de news:
46***********************@news.euronet.nl...
>
"Bob Bedford" <bo*@bedford.comwrote in message
news:46**********************@news.sunrise.ch...
>Hi all,

I've to resize uploaded images with the "imagecopyresampled" but when
I've images quite large (common those days) I reach the 16mb limits of
the ISP.

How can I fix this ? I absolutely need to resize such images.

Bob

Hi Bob,

maybe you can resize them first to an intermediate size using
'imagecopyresized', hoping that resizing takes up less memory than
resampled.

Richard
The memory limit is reached when "loading" the pixels in memory before
resizing so this solution won't work
Jun 29 '07 #6

"Bob Bedford" <bo*@bedford.comwrote in message
news:46**********************@news.sunrise.ch...
>
"Richard" <root@localhosta écrit dans le message de news:
46***********************@news.euronet.nl...
>>
"Bob Bedford" <bo*@bedford.comwrote in message
news:46**********************@news.sunrise.ch.. .
>>Hi all,

I've to resize uploaded images with the "imagecopyresampled" but when
I've images quite large (common those days) I reach the 16mb limits of
the ISP.

How can I fix this ? I absolutely need to resize such images.

Bob

Hi Bob,

maybe you can resize them first to an intermediate size using
'imagecopyresized', hoping that resizing takes up less memory than
resampled.

Richard
The memory limit is reached when "loading" the pixels in memory before
resizing so this solution won't work
Bob,
I dont know about that...
It should be possible to resize an image without loading it completely into
memory.
You just dont need the full image all the time.

Did you try it?

Also there are some upload java applets, that can do some resizing BEFORE
upload.
Maybe that way you can get things working?

If you really need to deal with images that large, then you are probably on
the wrong webhost.....
:(

Richard.
Jun 30 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Paul Jaeger | last post by:
I have jpeg images that are 2848 x 4256 pixels. I want to programatically convert them to images that are approximately 427 x 638 (that maintains the ratio) and save to new jpeg files. How can...
0
by: Jay | last post by:
Hi guys, trying to fix a problem with an image resize routine. The code posted below uploads and resizes a jpeg, probablem is, the outlook can look a bit bitty becuase of teh samller size...is...
1
by: John Scott | last post by:
I am storing an image in an SQL database and have one field as an image datatype. I am also using a webservice to transport data. I want to be able to resize the image and pass back a thumbnail...
5
by: Tamir Khason | last post by:
I have huge bitmap inmemory (about 4K x 6K 300dpi) and I want to quick resize it so old fasion way: Bitmap result = new Bitmap( nSize.Width, nSize.Height); using( Graphics g1 =...
15
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the...
4
by: lawrence k | last post by:
I've a jpeg image that is 514k, which doesn't strike me as very large. Yet I'm running out of error when I try to resize it: Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to...
11
by: eholz1 | last post by:
Hello PHP group, I am using some php code to check the size of images, and then resize or determine new dimension for the image. GD seems quite slow. It takes about 5 seconds (plus or minus) to...
8
by: infoseekar | last post by:
Image Resize & Rotation Hi I have 2 scripts, one for Image rotation and other image resize and they both are working. Image resize scripts load the picture and resize it and Image rotation...
5
by: mnflint | last post by:
I am having a problem resizing multiple images at a time. The images are 13200x20394 1bpp png images. In my sample set of 10 I can proess 4 before I get an "Out of memory" error. I am running...
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: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.