On the Slack channel, Liam Collod wrote:
I am working with oiiotool and I have an issue with expressions. I am setting the --origin which relies on the x,y being prefixed by their sign. However both x and y are expression which means their result may be positive or negative without knowing in advance.
* --origin +{exprX}+{exprY} : If I add the + prefix and exprY result is negative, oiiotool will complain.
--origin -{exprX}-{exprY} If do the inverse with a - prefix and exprY is negative, oiiotool will complain too.
--origin {exprX}{exprY} And I don't add a sign prefix positive expression will fail if exprY is positive.
How do I handle this ?
The only solution I found is to store the sign in an user variable using oiiotool --if conditions but that looks to be a quite complicated solution. (--if {exprx>0} --set xsign "+" --else --set xsign "" --endif --origin {xsign}{exprX}...)
On the Slack channel, Liam Collod wrote:
I am working with oiiotool and I have an issue with expressions. I am setting the --origin which relies on the x,y being prefixed by their sign. However both x and y are expression which means their result may be positive or negative without knowing in advance.
*
--origin +{exprX}+{exprY}: If I add the + prefix and exprY result is negative, oiiotool will complain.--origin -{exprX}-{exprY}If do the inverse with a - prefix and exprY is negative, oiiotool will complain too.--origin {exprX}{exprY}And I don't add a sign prefix positive expression will fail if exprY is positive.How do I handle this ?
The only solution I found is to store the sign in an user variable using oiiotool --if conditions but that looks to be a quite complicated solution. (
--if {exprx>0} --set xsign "+" --else --set xsign "" --endif --origin {xsign}{exprX}...)