gmic-cli round real to integer

Hallo,

I start to learn the g’mic cli.

There is just one image on the stack. It consists of real values between 0 and 2^16. I want to round (i.e. floor) these values.

100%,100%,100%,100%,0
add[1]  {floor(i#0)} 

…did not work. At the moment, I have just one clumsy solution:

 -o  qwhrf.tif,ushort
  qwhrf.tif

Is there a better solution?

Daniel

Try using round.

Thanks.