im trying to write a templated interface to imagemagick.
it would basically be what CSS is to HTML.
it says "put some text here, use this font, use this color, use a slight dropshadow. put more text on top of it here, etc etc"
nothing terribly complicated.
is there a sane way to do this that's already been hammered out somewhere? any hints?
thank you!
Possibly related thread here
css-like declarations aimed at ImageMagick?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: css-like declarations aimed at ImageMagick?
I don't know how relevant these are but you might want to look at http://www.designconsult.nl/imagemagick/pooco wrote:im trying to write a templated interface to imagemagick.
it would basically be what CSS is to HTML.
it says "put some text here, use this font, use this color, use a slight dropshadow. put more text on top of it here, etc etc"
nothing terribly complicated.
is there a sane way to do this that's already been hammered out somewhere? any hints?
thank you!
Possibly related thread here
Also I have a command line script for doing texteffects at http://www.fmwconcepts.com/imagemagick/index.html
-
- Posts: 1015
- Joined: 2005-03-21T21:16:57-07:00
Re: css-like declarations aimed at ImageMagick?
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
See my message in this topic for a link to a zip of all the files.
Re: css-like declarations aimed at ImageMagick?
thank you, but i don't think either of these are quite what i'm looking for.
i was hoping there would be a standardized way to define how text is laid out within imagemagick
something that takes a definition file, possibly like this:
image: 500x500px
text1: arial, black, 10px from top, 5px from left, drop shadow, ...
text2: helvetica, white, 5px from top, 10px from right
background: foo.png, repeat-x
and a layout file, possibly like this:
<text1>hello there</text1>
<text2>hello there</text2>
and creates an image. similar to the relationship with CSS and HTML, but skewed for IM and graphic layout.
edit: i suppose both could be XML-based, which would make parsing easy.
i was hoping there would be a standardized way to define how text is laid out within imagemagick
something that takes a definition file, possibly like this:
image: 500x500px
text1: arial, black, 10px from top, 5px from left, drop shadow, ...
text2: helvetica, white, 5px from top, 10px from right
background: foo.png, repeat-x
and a layout file, possibly like this:
<text1>hello there</text1>
<text2>hello there</text2>
and creates an image. similar to the relationship with CSS and HTML, but skewed for IM and graphic layout.
edit: i suppose both could be XML-based, which would make parsing easy.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: css-like declarations aimed at ImageMagick?
Perhaps the Magick Scripting Language is where you want to start. I believe that it is XML, but don't know much about it or where there is any documentation, but you can find some things here:pooco wrote:thank you, but i don't think either of these are quite what i'm looking for.
i was hoping there would be a standardized way to define how text is laid out within imagemagick
something that takes a definition file, possibly like this:
image: 500x500px
text1: arial, black, 10px from top, 5px from left, drop shadow, ...
text2: helvetica, white, 5px from top, 10px from right
background: foo.png, repeat-x
and a layout file, possibly like this:
<text1>hello there</text1>
<text2>hello there</text2>
and creates an image. similar to the relationship with CSS and HTML, but skewed for IM and graphic layout.
edit: i suppose both could be XML-based, which would make parsing easy.
viewforum.php?f=9
and the thread at
viewtopic.php?f=9&t=9627
Last edited by fmw42 on 2008-11-07T13:59:21-07:00, edited 1 time in total.
Re: css-like declarations aimed at ImageMagick?
thanks, interesting! too bad there are no docs and support seems dead.
if the markup is thorough enough, it may just be a matter of putting some kind of variable inside:
<draw text="$t" />
and having that be replaced at run-time.
note to developers: its possible that the markup remains obscure because it's not pushed very hard. proper documentation would help tremendously. guess i'll play around and see how adept it as at manipulating text (drop shadows,etc) and such. one feature that would be very handy is replacing scripted variables on the commandline somehow:
run-script-executable scriptfile.msl -text1="hello world"
Some amateur docs:
http://www.linux-nantes.org/~fmonnier/I ... ed-msl.php
http://www.cs.sunysb.edu/documentation/ ... njure.html
edit: thread continued here
if the markup is thorough enough, it may just be a matter of putting some kind of variable inside:
<draw text="$t" />
and having that be replaced at run-time.
note to developers: its possible that the markup remains obscure because it's not pushed very hard. proper documentation would help tremendously. guess i'll play around and see how adept it as at manipulating text (drop shadows,etc) and such. one feature that would be very handy is replacing scripted variables on the commandline somehow:
run-script-executable scriptfile.msl -text1="hello world"
Some amateur docs:
http://www.linux-nantes.org/~fmonnier/I ... ed-msl.php
http://www.cs.sunysb.edu/documentation/ ... njure.html
edit: thread continued here