Chris,
The overlay tag goes inside the image tag. Looking at some of my
scripts, I see that I used the movie tag instead of the image tag.
(Movies can be one frame!) Can't remember why I did this; but it
definitely works.
Bill Fingerhut
On 2/20/2014 6:18 PM, Chris Herbster wrote:
Thanks Bill,
I was able to get a basic script to work that saved an image. When I
tried to add the overlay tag I broke what had been working. Does the
overlay tag live in a block before, after or inside of the image tag?
It seems that I get errors about tags not being closed now. (isl,
overlay, image) I can generate a number of errors, depending on the
nesting of these things. Alternatively, am I being dense? Does the
overlay tag replace the image tag to create the image with that overlay?
When I tried this code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<isl debug="true" loop="1" offscreen="true" sleep="10.0seconds">
<bundle clear="true" file="${islpath}/test3.xidv" height="600"
wait="true" width="800"/>
<image file="${islpath}/${time:yyyyMMdd_HHmm}.png">
</image>
<overlay
image="${islpath}/${time:yyyyMMdd_HHmm}.png"
text="${time:HHmm}"
place="UR"
anchor="M"
fontsize="48"
fontface="Lucida Sans"
color="white"
background="black"
transparency="0" >
</overlay>
</isl>
The image is created (without the overlay) but I get the messages:
Thu Feb 20 18:08:12 EST 2014: Loading bundle: ./test3.xidv
Thu Feb 20 18:08:31 EST 2014: Writing image:./20060912_1400.png
Unknown tag:overlay
-----
When I place just the </image> tag after the block of overlay code I get:
Thu Feb 20 18:07:01 EST 2014: Loading bundle: ./test3.xidv
java.lang.StringIndexOutOfBoundsException: String index out of range: 2
at java.lang.String.substring(Unknown Source)
at ucar.unidata.ui.drawing.Glyph.getPointOnRect(Glyph.java:428)
at ucar.unidata.ui.drawing.Glyph.getPointOnRect(Glyph.java:346)
at ucar.unidata.ui.ImageUtils.parsePoint(ImageUtils.java:474)
at
ucar.unidata.idv.ui.ImageGenerator.processImage(ImageGenerator.java:5075)
at
ucar.unidata.idv.ui.ImageGenerator.captureImage(ImageGenerator.java:4230)
at
ucar.unidata.idv.ui.ImageGenerator.processTagImage(ImageGenerator.java:2916)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
ucar.unidata.idv.ui.ImageGenerator.processNode(ImageGenerator.java:1036)
at
ucar.unidata.idv.ui.ImageGenerator.processChildren(ImageGenerator.java:1070)
at
ucar.unidata.idv.ui.ImageGenerator.processTagGroup(ImageGenerator.java:2735)
at
ucar.unidata.idv.ui.ImageGenerator.processTagIsl(ImageGenerator.java:2689)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
ucar.unidata.idv.ui.ImageGenerator.processNode(ImageGenerator.java:1036)
at
ucar.unidata.idv.ui.ImageGenerator.processScriptFile(ImageGenerator.java:949)
at
ucar.unidata.idv.ui.ImageGenerator.processScriptFile(ImageGenerator.java:873)
at
ucar.unidata.idv.ui.ImageGenerator.processScriptFiles(ImageGenerator.java:857)
at ucar.unidata.idv.ArgsManager$1.run(ArgsManager.java:407)
at
ucar.unidata.idv.ArgsManager.runInitRunnables(ArgsManager.java:454)
at ucar.unidata.idv.ArgsManager.access$000(ArgsManager.java:73)
at ucar.unidata.idv.ArgsManager$3.run(ArgsManager.java:433)
at ucar.unidata.util.Misc$3.run(Misc.java:1251)
An error occurred:java.lang.StringIndexOutOfBoundsException: String
index out of range: 2
----
When I stick the code for the image tag inside of the overlay block I
get the "Unknown tag" error and no image is created.
When I stick the code for the image after the overlay code then I get
the unknown tag error and no image is generated.
Thanks to anyone who can help,
CH
--
The Fingerhuts
Saint Johnsbury, Vt, 05819
email: fingerhuts3@xxxxxxxxx