image-processingimagemagickimagemagick-convert

Text Distortion with ImageMagick SRT commands


I am please bear with me as I am new to ImageMagick and I am hoping someone can point me in the right direction at what could be the cause of this exactly but my issue is this:

I am rendering some text to the image and it works fine unless I rotate the image.

I am using this command for rotation:

convert -format jpeg beach.jpg +profile !icc,* ( -background none -size 1698.071388x1698.071388 -gravity center -fill #ffffff -font regular.ttf -stroke none -strokewidth 0 label:Topher +distort SRT 849.035694,849.035694 1 45.275739 2098.879701,1151.202049 ) -flatten -quality 80 jpeg:beach-text.jpg

And the Image looks like this enter image description here

But if I leave rotation alone and my command looks like :

convert -format jpeg beach.jpg +profile !icc,* ( -background none -size 1698.071388x1698.071388 -gravity center -fill #ffffff -font regular.ttf -stroke none -strokewidth 0 label:Topher +distort SRT 849.035694,849.035694 1 0.0 2098.879701,1151.202049 ) -flatten -quality 80 jpeg:beach-text.jpg

The image comes out as expected:

enter image description here

As you can see the top of the T is all distorted out of whack. As I've said, I am new to ImageMagick so if there is anything that I am missing that may be of help to tracking down this issue let me know so I can add the info here. Thanks in advance for pointing me in the right direction.

P.S. This only seems to happen SOME times.... it isnt always reproducible and happens for letter like "g, j, y" as well at "T".

Upgrading to ImageMagick 7 did not solve the issue. The text is still rendered with that weird preceeding rendering artifact


Solution

  • Ive resolved this issue by removing the rotation values from the +distort SRT command and leaving that 0 but placing a -rotate [degrees] command before it. Everything renders as it should now.