Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 21 Sep 2014, 10:11
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Using convert -annotate or -append label
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
ravensrest


Joined: 22 Feb 2008
Posts: 321
Location: Hood Canal, WA

PostPosted: Thu 21 Jun 2012, 14:32    Post_subject:  Using convert -annotate or -append label  

Has anyone been able to add text to a picture using convert and the annotate or append label options? I cannot seem to make them work. I get an error whenever I use either that ImageMagick cannot find the requisite font:
Code:
[~]> convert /data/P1070053.jpg -background Khaki label:'Faerie Dragon' -gravity Center -append /data/test.jpg
convert: /usr/lib/libxml2.so.2: no version information available (required by /usr/lib/libMagickCore.so.3)
CRIT: rangecheck in .setuserparams
Operand stack:
    --nostringval--  --nostringval--  --nostringval--
CRIT: rangecheck in .setuserparams
Operand stack:
    --nostringval--  --nostringval--  --nostringval--
convert: unable to read font `/usr/lib/ImageMagick-6.6.2/config//usr/share/ghostscript/fontsx/n019003l.pfb' @ error/annotate.c/RenderFreetype/1056.
convert: Postscript delegate failed `/tmp/magick-XX3zrwSq':  @ error/ps.c/ReadPSImage/779.

This and all the other variations of the command string that I've tried produce /data/test.jpg, but there are no labels or annotations on any of them.

Oops, forgot. Have tried this in Puppy431, Slacko53, Wary53 and Racy53.

Thanks for any help you can offer.
BS
Back to top
View user's profile Send_private_message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9121
Location: Stratford, Ontario

PostPosted: Thu 21 Jun 2012, 15:27    Post_subject: Re: Using convert -annotate or -append label  

ravensrest wrote:
/fontsx

Is that correct or a typo? Because the "fontsx" folder certainly doesn't exist.

BTW, mtPaint can add text to an image, although that might not solve your problem.

[Edit] Try this:

Locate the folder /usr/share/fonts/default/Type1

Copy it into the folder /usr/share/ghostscript.

Rename the new folder as "fontsx".

Run convert with a command like:
Code:
convert infile -gravity South -background Plum -splice 0x18 -annotate +0+2 'Hello World' outfile
Back to top
View user's profile Send_private_message 
npierce

Joined: 28 Dec 2009
Posts: 858

PostPosted: Thu 21 Jun 2012, 16:54    Post_subject:  

Another good catch, rcrsn51.

I just installed imagemagick-6.6.2-6-w5 from the Wary 5 official repository. It contains a configuration file, /usr/lib/ImageMagick-6.6.2/config/type-ghostscript.xml, with 34 references to that non-existent directory (/usr/share/ghostscript/fontsx/).

For me, using Racy 5.2.2, this worked:
Code:
ln -s  /usr/share/ghostscript/fonts /usr/share/ghostscript/fontsx

Presumably correcting the configuration file would also work.

(And I see you've also added a solution to your post.)

Modifying ravensrest's command to use an existing file on Racy for a source, like so:
Code:
convert /usr/share/pixmaps/smileys.png -background Khaki label:'Faerie Dragon' -gravity Center -append /tmp/test.jpg

produced this:
test.jpg
 Description   
 Filesize   24.06 KB
 Viewed   238 Time(s)

test.jpg

Back to top
View user's profile Send_private_message 
ravensrest


Joined: 22 Feb 2008
Posts: 321
Location: Hood Canal, WA

PostPosted: Thu 21 Jun 2012, 20:08    Post_subject:  

Thank you both.

No, that is not a typo. ImageMagick is looking for fontsfx. Using the symbolic link suggested by npierce worked just fine.

I am continually amazed at the power packed into the various linux commands we use so casually.

Thanks again.
BS
Back to top
View user's profile Send_private_message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9121
Location: Stratford, Ontario

PostPosted: Thu 21 Jun 2012, 20:58    Post_subject:  

ravensrest wrote:
ImageMagick is looking for fontsfx.

As a test, I compiled ImageMagick from source in Slacko and it still wanted fontsx.
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0586s ][ Queries: 12 (0.0099s) ][ GZIP on ]