imagejpeg() not completing images

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mmm3228
Forum Newbie
Posts: 2
Joined: Mon Nov 03, 2008 2:26 pm

imagejpeg() not completing images

Post by mmm3228 »

I am trying to create an image for a user then email that image, however only some of these images are completed.
This is what the image should look like:
ImageImage

However, this is was some of the images will come out like:
ImageImage

I am creating a single image, emailing it, then creating another image and emailing it and so on overwriting the previous image each time. Currently I am only doing it with 15 images, but it needs to be scaled up to about 200.

Anyone have any ideas about what might be going on? Any help at all would be appreciated, im pretty new to php
User avatar
infolock
DevNet Resident
Posts: 1708
Joined: Wed Sep 25, 2002 7:47 pm

Re: imagejpeg() not completing images

Post by infolock »

i assume you're dynamically generating this with something like GD or ImageMagik.

Without any code it's kinda hard to determine what's going on.

With the code, (and I'm sure it's a lot), it might take some time to debug, but it's possible there is an issue here. Seems like the buffer is getting crapped out of the image you're generating.
mmm3228
Forum Newbie
Posts: 2
Joined: Mon Nov 03, 2008 2:26 pm

Re: imagejpeg() not completing images

Post by mmm3228 »

Yea, I am using GD to create the images. Ive found a work around by creating separate files in one loop and keeping track of file names in an array then emailing them in another loop and then deleting the file. This seems to work fine, its just prob not the most efficient piece of code.
User avatar
infolock
DevNet Resident
Posts: 1708
Joined: Wed Sep 25, 2002 7:47 pm

Re: imagejpeg() not completing images

Post by infolock »

Understandable. Glad you figured it out.
Post Reply