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?".
immortal26
Post
by immortal26 » 2010-07-13T11:55:53-07:00
Well simple as this.
Here is the code:
Code: Select all
$path = "/opt/local/bin/";
$comp = '/working/www/core/html/hc/back/comp/';
$bfont = '/working/www/core/html/hc/back/fonts/c128b.pfa';
$compolay = $path.'convert -pointsize 72 -fill "#000000" -background white -font '.$bfont.' label: "'.$barcode.'" '.$comp.'bar.png';
exec($compolay);
does not create the image.
Also when running a static command of the one above in the command line... just hangs, until I ctrl-c out
I have checked the formats, pfa is supported, gs is installed, ft is installed... everything is installed correctly, only hangs with this.
Any ideas?
snibgo
Posts: 12159 Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK
Post
by snibgo » 2010-07-13T12:22:43-07:00
I can't see anything obviously wrong. Does the command:
convert logo: logo.png
work?
If so, change things until it matches your command. At what point does it fail? What is the simplest command that fails?
immortal26
Post
by immortal26 » 2010-07-13T12:28:50-07:00
Yup worked just fine.... weird.
I'm going to pm you the pfa font, maybe you can give it a try?
snibgo
Posts: 12159 Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK
Post
by snibgo » 2010-07-13T12:47:42-07:00
I've picked up the pfa font. Never heard of them, and know nothing about them. When I try:
convert -pointsize 20 -fill #000000 -font c128b.pfa label:"snibgo" x.png
I get Ghostscript errors:
Error: /typecheck in /findfont
Operand stack:
c128b.pfa-ISO c128b.pfa-ISO c128b.pfa
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-
- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- fa
lse 1 %stopped_push 1878 1 3 %oparray_pop 1877 1 3 %oparray_
pop 1861 1 3 %oparray_pop 1755 1 3 %oparray_pop --nostringval-
- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringv
al-- 2 %stopped_push --nostringval-- --nostringval-- 1836 3 3 %o
parray_pop
Dictionary stack:
--dict:1161/1684(ro)(G)-- --dict:0/20(G)-- --dict:72/200(L)--
Current allocation mode is local
Current file position is 259
GPL Ghostscript 8.71: Unrecoverable error, exit code 1
Error: /typecheck in /findfont
Operand stack:
c128b.pfa-ISO c128b.pfa-ISO c128b.pfa
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-
- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- fa
lse 1 %stopped_push 1878 1 3 %oparray_pop 1877 1 3 %oparray_
pop 1861 1 3 %oparray_pop 1755 1 3 %oparray_pop --nostringval-
- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringv
al-- 2 %stopped_push --nostringval-- --nostringval-- 1836 3 3 %o
parray_pop
Dictionary stack:
--dict:1161/1684(ro)(G)-- --dict:0/20(G)-- --dict:72/200(L)--
Current allocation mode is local
Current file position is 259
GPL Ghostscript 8.71: Unrecoverable error, exit code 1
convert: unable to read font `c128b.pfa' @ error/annotate.c/RenderFreetype/1056.
Could be a bad pfa file. Do other pfa files work?
immortal26
Post
by immortal26 » 2010-07-13T13:26:37-07:00
hmm, i don't get any errors with it. The font is fine (bought lol).
Just hangs on mine, but no errors.
Maybe need some help from Admins
anthony
Posts: 8883 Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia
Post
by anthony » 2010-07-13T16:57:13-07:00
Try using a truetype font and see if that works fine.