Conditions in MSL?

Discuss the conjure program and the Magick Scripting Language (MSL) here. MSL is an XML-based wrapper to the ImageMagick image-processing functions.
Post Reply
noonesshadow

Conditions in MSL?

Post by noonesshadow » 2010-07-13T16:04:04-07:00

What I'm trying to do is overlap two images, resizing the larger one to the smaller one. Since I don't know which one will be larger and which smaller, I can't predefine the resize option. Is there any way in MSL to compare two numbers and perform different actions based on this condition?

User avatar
anthony
Posts: 8870
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Conditions in MSL?

Post by anthony » 2010-10-07T18:32:36-07:00

Sorry for the lateness of my reply - I don't normally watch this forum.

You could resize both with a '>' flag

This only resizes larger images, so one of the resizes will just not do anything.

The same flags are in MSL as they are in Command-line. See...
http://www.imagemagick.org/Usage/resize/#shrink
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
http://www.imagemagick.org/Usage/

Post Reply