James Taylor wrote:
I think there is a question about whether swapping from inside PHP to ImageMagick and back is a good thing or not - why spawn a separate process to do essentially the same work?
Another possibility is:
- Load image.
- Create new image to store text in
- Render text (make it vector based if possible)
- Resize-text-image to being correct size/proportion
- Merge text-image over image
The actual processing is slower than the spawning, so it's not particularly a problem, but I am moving towards using the Imagick PHP libraries which will bring the processing inside PHP rather than spawning a new process.
Spawning a process has the advantage that I can experiment at the commandline first (and can seek advice from a wider range of people), but the options are pretty straightforward to convert between library and commandline.