Mysterious blue line using SRT and layers
Posted: 2015-11-16T09:36:55-07:00
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)
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)
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:
Which produces the following result:
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?
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)
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)
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
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?