Wrong result on texts

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?".
Post Reply
Lupus
Posts: 5
Joined: 2012-03-12T06:42:03-07:00
Authentication code: 8675308

Wrong result on texts

Post by Lupus »

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?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Wrong result on texts

Post by fmw42 »

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

Re: Wrong result on texts

Post by Lupus »

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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Wrong result on texts

Post by fmw42 »

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

Re: Wrong result on texts

Post by Lupus »

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.
Post Reply