Calling convert from Python script
Posted: 2017-08-14T05:53:53-07:00
Hello,
I think I have a problem with escape sequences when calling "convert" from Python using os.system('convert...').
I want to draw a text in an Image like this:
"Temperature: 28.1 °C"
What is working:
which results in "Humidity_39.6"
What is not working:
which results simply in "Humidity" with error message "convert: non-conforming drawing primitive definition `:' @ error/draw.c/DrawImage/3184."
Same thing here:
which results in "Humidity\ 39.6". So the space is displayed correctly, but the line continuation character is drawn as well
Can you help me? It would be great to have a tab between the fixed text and the value. For example:
Thank you very much in advance!
Regards
I think I have a problem with escape sequences when calling "convert" from Python using os.system('convert...').
I want to draw a text in an Image like this:
"Temperature: 28.1 °C"
What is working:
Code: Select all
-draw \"text 40,240 Humidity_'+format(round(humidity,1))+'\"
What is not working:
Code: Select all
-draw \"text 40,240 Humidity:'+format(round(humidity,1))+'\"
Same thing here:
Code: Select all
-draw \"text 40,240 Humidity\ '+format(round(humidity,1))+'\"
Can you help me? It would be great to have a tab between the fixed text and the value. For example:
Code: Select all
Temperature: 17.3 °C
Humidity: 48.2 %rH
Regards