/}}



{{/* need to create $variables as .variables dont work if = nill */}}


{{ $s := newScratch }}
{{ $s.Set "params" dict }}

{{ $meta := .common.meta }}
{{ $ctx := .common.ctx }}

{{ with .quality | default $meta.quality | default ($ctx.Param "image.quality") }}
  {{ if not (and (eq (printf "%T" .) "int") (and (ge . 1) (le . 100))) }}
    {{ partial "hri/private/utils/options-error" (dict 
      "var" "quality"
      "val" .
      "opts" "integers between 1-100 inclusive"
      "ctx" $.error_ctx
    ) 