Page 1 of 1

is MSL dead? and a feature request

Posted: 2008-11-07T13:49:36-07:00
by pooco
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"
from here

Re: is MSL dead? and a feature request

Posted: 2008-11-07T19:06:30-07:00
by magick
MSL is not dead. It is actively supported.

MSL variables are simply image properties. Depending on your interface method set the property. From the command line, for example, you use -define (e.g. -define dimensions="400x400").

Re: is MSL dead? and a feature request

Posted: 2008-11-08T14:04:46-07:00
by pooco
interesting. so how would one define an arbitrary text string on the commandline and pass that into the MSL?

define text1="xxxxxxxxxxxxx" ?

<draw text="%text1" /> ?

are there any simplistic examples anywhere of drawing a couple different lines of text on an image via any method?

Re: is MSL dead? and a feature request

Posted: 2008-11-08T15:49:17-07:00
by magick
Here is a simple annotation example:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<image size="400x400">
    <read filename="xc:white" />
    <annotate pointsize="48" x="20" y="200" text="%[text]" />
    <write filename="image.png" />
</image>
Save as annotate.msl and use these commands:
  • conjure -text ImageMagick annotate.msl
    display image.png

Re: is MSL dead? and a feature request

Posted: 2008-11-08T21:06:25-07:00
by pooco
got it, thank you very much!

we're having trouble translating the API techniques to an MSL file. it looks as though the method support is pretty haphazard?

for the moment, we're trying to create this:
text layer 1
text layer 1's drop shadow

text layer 2
text layer 2's drop shadow

background image
is this possible with MSL in its current state?

what i'm working with right now is:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<group>
	<image id="text1_shadow" size="300x75">
		<read filename="xc:transparent" />
		<annotate pointsize="48" x="22" y="52" fill="darkcyan" text="Hello" />
		<blur geometry="2x2" radius="20" />
	</image>
	<image id="text2_shadow" size="300x75">
		<read filename="xc:transparent" />
		<annotate pointsize="28" x="200" y="55" fill="transparent" stroke="white" strokewidth="2" text="there" />
		<blur geometry="2x2" radius="20" />
	</image>
	<image id="text1_fore" size="300x75">
		<read filename="xc:transparent" />
		<annotate pointsize="48" x="20" y="50" fill="white" text="Hello" />
	</image>
	<image id="text2_fore" size="300x75">
		<read filename="xc:transparent" />
		<annotate pointsize="28" x="200" y="55" fill="darkcyan" text="there" />
	</image>
	<image>
		<read filename="gradient:lightcyan-skyblue" />
		<composite image="text1_shadow" />
		<composite image="text1_fore" />
		<composite image="text2_shadow" />
		<composite image="text2_fore" />
	</image>
	<write filename="image.png" />
</group>