First, let's add text to a 500 by 500 pixel image:
Code: Select all
convert 500by500.png \
-gravity center \
-draw "text 0,0 'TEXT'" \
out.png
No problems so far:
Now let's crop the image (and add a line):
Code: Select all
convert 500by500.png \
-crop 400x400+0+0 \
-gravity center \
-draw "text 0,0 'TEXT'" \
-draw "line 0,200 400,200" \
out.png
Problem: drawing text doesn't respect the new image dimensions.
Note that line does respect the new dimensions, so even if text is somehow behaving as desired, it's still undesirable that line and text behave so differently given that their syntax is very alike.
Things get very complicated if you add crop offsets and resizing and then try to compensate for all of that. This can all be avoided if drawing text would behave like drawing lines, so:
Suggested fix: make drawing text behave the way drawing lines does.