Page 1 of 1

Mysterious blue line using SRT and layers

Posted: 2015-11-16T09:36:55-07:00
by bibby
What I am Trying To Do:
I am trying to create a speedometer. I have a speedometer background image, and a needle image. I want to rotate the needle image so that it points at the correct speed, rescale it, and place it on the speedometer image. The needle should be rotated around the base of the needle, and positioned on the speedometer such that the rotation point sits on top of the correct place on the speedometer.

I am using ImageMagick 6.9.1-4 Q16 x64 on Windows (the new line escape character is a carat).

Source Images:

Needle
("needle 392 12.png" dimensions:405x111 controlPoint: 392x12)
Image
Other links in case of 404:
http://postimg.org/image/gpcbck32z/
http://i.imgur.com/mVdg5Ro.png
http://i67.tinypic.com/2dlqi34.png

Speedometer
("speedo 74 72.png" dimensions:150x100 controlPoint:74x62)
Image
Other links in case of 404:
http://postimg.org/image/x97a87c1j/
http://i.imgur.com/Bm0zH3W.png
http://pasteboard.co/2bpcVHJi.png

After a lot of fiddling I ended using this command:

Code: Select all

convert "speedo 74 72.png"  ^
          ( "needle 392 12.png" -alpha set -virtual-pixel transparent ^
             +distort SRT "392.5,12.5  0.15 76 74.5,72.5" ^
          ) -background none -flatten speedoOutput.png
Which produces the following result:
Image
Other links in case of 404:
http://postimg.org/image/egottt2cv/
http://i.imgur.com/voK48IU.png

The Problem
The problem is that, while the needle appears to be positioned and rotated correctly, there is a mysterious blue line around the needle image. And also, if you look closely, there is a black bounding box around the needle image which obscures details of the background image.

I can't for the life of me fathom why this is happening, could anybody point me in the right direction?

Re: Mysterious blue line using SRT and layers

Posted: 2015-11-16T09:50:09-07:00
by snibgo
I don't get your blue line with v6.9.1-0, v6.9.1-6 or v6.9.2-5 on Windows 8.1.

Re: Mysterious blue line using SRT and layers

Posted: 2015-11-16T14:06:59-07:00
by bibby
snibgo wrote:I don't get your blue line with v6.9.1-0, v6.9.1-6 or v6.9.2-5 on Windows 8.1.
I just switched up to ImageMagick 6.9.2-6 Q16 x64 and the problem is gone!

Image

That was a nice and simple fix, thanks for the help :)