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 »

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: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Conditions in MSL?

Post by anthony »

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
https://imagemagick.org/Usage/
Post Reply