Page 1 of 1
MSL Documentation/Tutorial?
Posted: 2007-09-06T03:20:19-07:00
by d-fens
Hi folks,
i intend to use MSL for my purposes, but i can't find a really good documentation or tutorials. MSL is the best choice for me because i already have XML-Output which i only need to transform via XSLT. Maybe i do not see the wood for the trees, but after searching the web for hours i feel rather helpless.
Please give me some hints.
Thank you!
Re: MSL Documentation/Tutorial?
Posted: 2007-09-06T06:21:29-07:00
by magick
We think MSL is a good idea but very few people have shown interest so we have not put much development effort into it or its documentation. If you have specific questions post them here. If you need a new feature, ask and we'll try to implement it.
Re: MSL Documentation/Tutorial?
Posted: 2007-09-06T07:46:55-07:00
by d-fens
Well, i think i don't need any new features (for now). A list of elements and their attributes would be a good start, also some hints about nesting elements.
I already found some example scripts on the web, but when trying to execute them in the windows console using
i get error messages like
Code: Select all
conjure: unrecognized element `append'.
What's that about?
My aim is to position images and automatically word-wrapped text (like caption does) on a canvas. As i pointed out in my first posting, i already have a XML-Output with the text elements and references to image files, so a XSL transform into MSL should do the job.
By the way: i think MSL is a
great idea!
Re: MSL Documentation/Tutorial?
Posted: 2007-09-06T09:30:04-07:00
by magick
In principle you can use any ImageMagick option described here
http://www.imagemagick.org/script/comma ... ptions.php . However, we suspect some options have not made its way into MSL just yet. If you need an option thats not supported, post here and we will make it available in the ImageMagick beta release generally within 48 hours.
Post the content of your test.msl script here so we can download it and reproduce the problem.
Re: MSL Documentation/Tutorial?
Posted: 2007-09-07T00:35:19-07:00
by d-fens
Here is the code of the example. When i try to open it with imdisplay i get the message "imdisplay.exe: Must specify image size". Probably i've overseen some basics, but i really don't get it at the moment.
Code: Select all
<?xml version="1.0" ?>
<msl>
<image>
<append>
<layer>
<canvas width='50' height='50' color='#D33' />
</layer>
<layer>
<canvas width='50' height='50' color='#5A0' />
</layer>
<layer>
<canvas width='50' height='50' color='#29D' />
</layer>
</append>
<display />
</image>
</msl>
EDIT: Even if i replace the 3rd line by
nothing changes.
And now a specific question: How do i use the "draw" option in MSL? I tried several ways but get error messages all the time:
Code: Select all
<draw text="Hello World!" />
<draw text="20,20 Hello World!" />
<draw string="text 20,20 Hello World!" />
And i wonder if and how i can use "caption" in MSL ...
Re: MSL Documentation/Tutorial?
Posted: 2007-09-08T15:05:09-07:00
by magick
MSL is modeled after the PerlMagick API. However, as mentioned, some methods and attributes are not yet supported because there has been little demand. Since you asked we added support for the "append" element in ImageMagick 6.3.5-9 Beta (available in 24 hours). Your script should look like this:
Code: Select all
<?xml version="1.0" ?>
<msl>
<image size='50x50'>
<read filename='xc:#D33' />
<read filename='xc:#5A0' />
<read filename='xc:#29D' />
<append />
<display />
</image>
</msl>
Re: MSL Documentation/Tutorial?
Posted: 2007-10-12T09:17:26-07:00
by magick
We add elements on request. We'll add swap to ImageMagick 6.3.6-2 Beta by tomorrow.
Re: MSL Documentation/Tutorial?
Posted: 2010-11-24T10:24:19-07:00
by darin
Hi,
I need to determine the number of colors in an image from a web site... Is conjure/MSL the appropriate avenue to do this? What command would i use?
Thanks,
Darin