I try to transform text to image with 2 simple lines of code:
Code: Select all
$content = file_get_contents("longtextclean.txt");
exec('convert -background transparent -fill orange -font Arial -pointsize 12 -interline-spacing -5 -size 3500x3500 caption:"'.$content.'" textimage.png')
With 6000 characters the generated file gets 140mb in size and to render takes more than 60 seconds. Comparing doing it with GD in half the time this was unexpected.
Considering i intend to make use of 50/k words even by increasing memory_limit & max_execution_time the script will abort.
So my question: What can i do the speed up the process AND reduce the size of the file in mb without losing much quality ?
( I already set the pointsize to make the automatic calculation obsolete, maybe the use of bmp fonts would speed up too, unfortunately i can't make use of that)
Thanks for tips
Have a great day!
Gerome