Welcome Guest, Not a member yet? Register   Sign In
Image manipulation, silent fail
#1

[eluser]dpdp[/eluser]
Hey guys,

I've been writing some utility functions on our latest project for image manipulations; just processing out profile avatars to various sizes and whatnot.

This was all working fine until tonight, out of nowhere. Now image_lib is just failing silently. It works live, but for some reason stopped out of nowhere in my local environment.

I can initialize my config fine, but when I try to run any funtions (resize, crop,etc) I get nothing and the process dies.


Does anyone have experience with this? Any idea as to why this might happen?
#2

[eluser]dpdp[/eluser]
For the record:

Apparently either GD or the image_lib are failing silently when the images are too large to process. Unfortunately doesn't spit out an error or log anything... c'est la vie.

Edit-- All that to say: consider my problem solved.
#3

[eluser]daparky[/eluser]
How did you solve it?
#4

[eluser]dpdp[/eluser]
I stopped uploading photos that were too big, haha. For development purposes I have no reason to modify the limits yet, cross that bridge when we're ready.
#5

[eluser]daparky[/eluser]
I had a similar problem where my images weren't processing, only to realise i was uploading BMP's when the GD2 library doesn't support BMP's.
#6

[eluser]dpdp[/eluser]
Actually in retrospect that could have been my problem too. I'll have to double check when I have a minute and update this.
#7

[eluser]daparky[/eluser]
As far as i know JPG, GIF and PNG's are supported. You need to use a seperate function to handle BMP's. Who uses BMP for web nowadays anyway?

Anyway, i'll await your update.
#8

[eluser]rogierb[/eluser]
GD and JPG are not a match made in heaven. The way GD resizes a image is rather straightforward and very memory consuming.

Basically it decomresses a JPG, then start working on it.
This means that the highly compressed JPG gets unpacked pixel by pixel. I've seen GD use more then 256MB with large detailed JPG's.
If for some reason GD craps out, try to double the memory limit in php.ini and see what happens.




Theme © iAndrew 2016 - Forum software by © MyBB