Welcome Guest, Not a member yet? Register   Sign In
Image Manipulation Class & max image size
#1

[eluser]hendrik[/eluser]
Is there a maximum filesize or dimension (width/height) that the image manipulation class cannot deal with?

My resize function works fine until it hits images wider than 4000px. (Haven't determine exactly when it stops working, the images might be even smaller.)
#2

[eluser]Dam1an[/eluser]
Not sure if there's a limit on width/height, but it could just the be file size limit?
Try a 1x4000 and 4000x1 images, see if they work
#3

[eluser]jedd[/eluser]
My money would be on Apache/PHP memory limits - try bumping that up to something substantially larger, and consult the forums again if pain persists.
#4

[eluser]hendrik[/eluser]
I've uploaded a jpg (1px X 4000px) & (100px X 4000px). Worked fine.

Got the issue with jpg 1000px X 4000px, filesize 48kb. I made sure it's 72dpi.
#5

[eluser]rogierb[/eluser]
Increase the memory limit apache/php is allowed to use. It's a well known problem when dealing with jpg since jpg is a compressed format and to manipulate an image it has to be decompressed.
#6

[eluser]Dam1an[/eluser]
[quote author="rogierb" date="1242760920"]Increase the memory limit apache/php is allowed to use. It's a well known problem when dealing with jpg since jpg is a compressed format and to manipulate an image it has to be decompressed.[/quote]

That makes sense... I was puzzled for a minute wondering how a 48Kb image can be a memory problem lol
#7

[eluser]hendrik[/eluser]
Also tried gif(4kb) & png(20kb) at those sizes. Didn't work. Memory_limit=8M

Do you think that maybe 1000x4000=4000000 pixels are too much for GD2 to handle?
#8

[eluser]Dam1an[/eluser]
I just realised, you never told us what error you get when you say it stops working...
Apparently, there's a pixel limit variable you can change in the GD2 config file (no idea where that is though)
#9

[eluser]hendrik[/eluser]
[quote author="Dam1an" date="1242764727"]I just realised, you never told us what error you get when you say it stops working...
Apparently, there's a pixel limit variable you can change in the GD2 config file (no idea where that is though)[/quote]

Although I var_dump($this->image_lib->display_errors()Wink; I don't get any. Just a blank page with no html. It's as if I've got a syntax issue or the script simply bombs out.

With the smaller images it gets redirected to page with listing of images once resize is complete. (so I've ruled out syntax)
#10

[eluser]Dam1an[/eluser]
Have you tried increasing the PHP timeout (I'm not sure if you get an error when it times out or a blank screen, but its worth trying)




Theme © iAndrew 2016 - Forum software by © MyBB