How to replicate inpaint results from within GIMP in GMIC interpreter?

Maybe some additional information about this.
When you do a selection in GIMP, what is given to the G’MIC plug-in is only the image corresponding to the bounding box of that selection. So the inpainting filter is able to find image information only in that bounding box (so if your selection is perfectly rectangular, it won’t work at all).

Using selections with the inpainting filter is a smart way to restrict the search area for the image reconstruction, because sometimes other (wrong) regions of images can match the similarity function and may be copied in the region to reconstruct.

If you use the command line, then yes, the best way to do the same is to perform the filter on a pre-cropped image, just as you did.

1 Like