This project has moved and is read-only. For the latest updates, please go here.

MagickScript issues

Oct 4, 2013 at 4:18 PM
version 6.8.7
<resize geometry="720^>"/>
not working, but
magickImage.Resize(new MagickGeometry("720^>"));
is working
<setOption format="Jpeg" name="size" value="1280x1280" />
not working as expected, <read> load the file without using the option

thank you very much.
Oct 4, 2013 at 8:34 PM
You need to escape '>':
<resize geometry="720^&gt;"/>
I should probably add setOption to the MagickReadSettings because specifying it like the example below will do nothing:
<read>
  <setOption>
</read>
I will see if I can create the following:
<read>
  <settings>
    <setOption>
    <setOption>
  </settings>
</read>
Oct 5, 2013 at 6:05 PM
Edited Oct 5, 2013 at 6:12 PM
The 'geometry' attribute is invalid - The value '720^>' is invalid according to its datatype 'geometry' - The Pattern constraint failed.
this error are throw even escape '>' or '^'
"720>" work without escape

but <read> still come before setOption,
specially when using readEvent
ScriptReadEventArgs.Image = new MagickImage(...);
seem eventually will overwrite the settings (or not?)


thank you very much.
Oct 5, 2013 at 7:54 PM
I'm sorry, I forgot about the pattern in the xsd. I will fix this so you can specify both ^ and >.

When you are using the Read event you could to something like this:
MagickImage image = new MagickImage();
image.SetOption(MagickFormat.Jpeg, "size", "1280x1280");
image.Read("yourfile.jpg");
ScriptReadEventArgs.Image = image;
Oct 6, 2013 at 6:40 PM
yes this will work,
but also missing the point that to using "script"
by using script, we can have everything external without hard-coded or rely on another configuration file.

thank you
Oct 20, 2013 at 1:59 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.