Re: Timing problem, putting PNG into PDF
| From: | David Otton | Date: | Thu, 21 Aug 2008 11:04:08 +0000 |
| Subject: | Re: Timing problem, putting PNG into PDF | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-278458@lists.php.net to get a copy of this message | ||
2008/8/12 Brian Dunning <brian@briandunning.com>:
> I'm using GD to crop & save an uploaded image, and then embedding it into a
> PDF made with FPDI. It works great when the image is small or low-res. When
> the uploaded file is bigger, more than a couple hundred K or so, it fails. I
> think that the image is not done writing yet by the time I try to do the
> $pdf->Image. Any suggestions? Some way to force it to hang out and pause
> until the image is done writing?
It's more likely you're hitting a memory limit in your script. Pare
your script down to just the resize action, and turn error reporting
on.
What function are you calling to do the resize? It shouldn't return
until it's finished processing.
BTW, ImageMagick produces smoother results than GDLib when resizing.
--
http://www.otton.org/