When dealing with 16bits images, some care must be taken.
As the image values are in [0,65535], this usually has a strong influence on the algorithm parameters. I believe it does make a difference for the inpainting algorithm. It’s usually a good idea to first divide your image values by 257, apply the algorithm with the parameters you have for 8bits images, then multiply the result by 257 afterwards.
Note that you won’t loose any precision as G’MIC internally stores images with float-valued buffers.
Also note that if you output a tiff with G’MIC, it will output a float-valued tiff file, which is unfortunately not often supported by other programs. So it is a good idea to force the output to be in unsigned short mode, like this :
$ gmic -i input_16bits.tiff -div 257 ... put the inpainting commands here ... -mul 257 -cut 0,65535 -o output_16bits.tiff,ushort
Concerning the color profile, I believe this has to do with the exif info ? Maybe this thread could help ?
I tried your command line. It was very fast, the output was readable, but the output
image was the same as the input image, i.e. the red areas were not inpainted.
well, if your 16bits input image defines the mask with pure red pixels, they should have value (65535,0,0), and then dividing the image with 257 should give you (255,0,0) which is correct for the command -select_color.
You can try to add a -display in the command line, just after the --select_color to see the mask (picture on the right). It it is totally black, then it means your mask color has not been detected, and probably the color of the mask is not pure red.
Any chance you can post the tif file somewhere so I can test and tell you what’s going on ?
Also, beware that the inpainting filter in the G’MIC plugin for GIMP does things a bit more complicated than just invoking command -inpaint. You can get the exact command used by the plug-in by selecting Output messages -> Verbose [layer name], apply the filter then look at the layer name to get the exact command invoked.