Inpaint on the command line

The color of your mask if not ‘pure red’. It has values (65535,26,0) instead of (65535,0,0) which explains the problem of mask detection.

This command line works reasonably well for me :

$ gmic ~/Downloads/input1.tif --select_color 0,65535,26,0 -/[0] 257 -inpaint_patchmatch[0] [1] -rm[1] -*[0] 257 -o result.tif,ushort

with a 16bits output file result.tif (takes time to compute with such a resolution anyway!)