Skip to content

bug: oiiotool --offset syntax is not good with expressions #5207

@lgritz

Description

@lgritz

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}...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions