Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Lupus
Posts: 5 Joined: 2012-03-12T06:42:03-07:00
Authentication code: 8675308
Post
by Lupus » 2012-03-13T08:07:10-07:00
I'm trying to create an image ;
Code: Select all
C:\\ImageMagick-6.7.6-Q16\\convert.exe -density 96 -background transparent -fill red -pointsize 72 -font Arial label:text text.png
won't give 96 dpi 72pt text in Arial font. I mesured the output on different programs and it never gives right result.
Am I doing something wrong or is it a bug?
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2012-03-13T09:57:03-07:00
try
C:\\ImageMagick-6.7.6-Q16\\convert.exe -background transparent -fill red -pointsize 72 -font Arial label:text -density 96 text.png
Lupus
Posts: 5 Joined: 2012-03-12T06:42:03-07:00
Authentication code: 8675308
Post
by Lupus » 2012-03-13T11:28:37-07:00
fmw42 wrote: try
C:\\ImageMagick-6.7.6-Q16\\convert.exe -background transparent -fill red -pointsize 72 -font Arial label:text -density 96 text.png
nothing changed
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2012-03-13T11:36:00-07:00
This works for me in IM 6.7.6.0 Q16 Mac OSX Snow Leopard
convert -background transparent -fill red -pointsize 72 -font Arial label:text -density 96 text.png
identify -verbose text.png
Image: text.png
Format: PNG (Portable Network Graphics)
Class: DirectClass
Geometry: 117x81+0+0
Resolution: 96x96
...
What version of IM are you using? Perhaps an upgrade is in order?
Lupus
Posts: 5 Joined: 2012-03-12T06:42:03-07:00
Authentication code: 8675308
Post
by Lupus » 2012-03-13T12:24:25-07:00
Turns out its my fault. I'm trying to execute this code via nodejs's spawn method:
ok it seams when I executed this with wrong parameters:
Code: Select all
var RGB = 'rgb(0,100,0)';
var fsize = 50; //something like that
var ls = spawn('C:\\ImageMagick-6.7.6-Q16\\convert.exe', ['-background', 'transparent', '-density', 96, '-fill', RGB ,'-font', 'Arial', '-pointsize', fsize, '-gravity', 'NorthWest', 'label:' + metin ,'PNG:-']);
Thanx for help.