Gimp-Forum.net

Full Version: GMIC chops off image in GIMP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm using the latest GIMP and the latest GMIC. I'm doing a face swap using a layer mask on one pic. I'm using layer/blend (seamless), input - all visible. It's cutting off a good part of the pic and I can't recover that part by using Image/fit canvas to layer. It's simply chopped off. What can I do to prevent this?

Other time I've used this same preset without this happening. I went ahead and reinstalled GMIC, because at one time earlier today GIMP said the GMIC plugin crashed. This is an old computer 4 gigs of RAM.
First of all give a screenshot of Gimp with the layers dock showing, something like this. https://i.imgur.com/DYZ6B4c.jpg

If any of the layers are outside the canvas area then enable View -> Show-All just so you can see them. https://i.imgur.com/HsS9F1z.jpg

From a couple of experiments with g'mic, as you found, it will crop off parts of the image according to layer sizes. In this case, best I can suggest is add a large layer that includes all other layers. Even that I think is a bit dodgy. The layer colour does matter and a transparent layer gives strange results. Best I got is with black. https://i.imgur.com/qKNDUZ2.jpg

...but give it a try https://i.imgur.com/U60qiQ3.jpg

My advice, g'mic filters are strange when it comes to transparency, Separate the operations. make a replacement face as a separate image, copy it into the main image and gmic seamless merge it. Keep it simple.
Here are 2 screenshots of Gimp

https://onedrive.live.com/?id=C256E2DAE2...DAE26B22A5

The first shows the exact GMIC window with the settings I used. The window of the picture inside of GMIC is cutoff even there. The pic is supposed to show the mid torso of the body also, not just the face. The final result actually looks just like that pic inside GIMP. The 2nd screen shot shows this final result

The final result pic is supposed to fill that whole black box on the screen , not all moved over to the bottom right. 
I went back to the project and chose Layer/ layer to image size for both the masked layer and the other once. It created this very large while backing. I tried GMIC again this time GMIC plugin crashed. I closed and reopened GIMP,  it crashed, then I reinstalled, GMIC - crashed. Reinstalled GIMP. Tried again - crashed. GIMP must not like the very large white background it shows for both images when I selected -  Layer/ layer to image size

Any suggestions?
(05-26-2021, 10:24 PM)GMP Wrote: [ -> ]Here are 2 screenshots of Gimp

https://onedrive.live.com/?id=C256E2DAE2...DAE26B22A5

The first shows the exact GMIC window with the settings I used. The window of the picture inside of GMIC is cutoff even there. The pic is supposed to show the mid torso of the body also, not just the face. The final result actually looks just like that pic inside GIMP. The 2nd screen shot shows this final result

The final result pic is supposed to fill that whole black box on the screen , not all moved over to the bottom right. 
I went back to the project and chose Layer/ layer to image size for both the masked layer and the other once. It created this very large while backing. I tried GMIC again this time GMIC plugin crashed. I closed and reopened GIMP,  it crashed, then I reinstalled, GMIC - crashed. Reinstalled GIMP. Tried again - crashed. GIMP must not like the very large white background it shows for both images when I selected -  Layer/ layer to image size

Any suggestions?

There is a message in the GMIC window that says that the filter needs two layers and you have only one? Your layer is also mostly filled with transparency (the layer boundary is the yellow-black dotted line). Is that normal?
Any suggestions - plenty. The main one as before - keep it simple.

From your screenshot. The canvas size is 4800 x 3600 and looks like that was imposed on your smaller (about 2200 x 2800 ) layer. There is a layer boundary showing.

(1) Get rid of the excess canvas. Image -> Fit Canvas to Layers
(2) Now you can plant your replacement face over the base layer. In previous posts you want to use a layer mask but not able to adjust the colours. Make sure the Image icon in the layer dock is active (white border)

[attachment=6073]

(3) Time to fit to the base layer. The unified transform tool does all scale, move, rotate as required. Practice using it. 
(4) When in position, apply the layer mask `Layer -> Mask -> Apply Layer Mask) 'keeping it simple'

[attachment=6074]

(5) Now time to apply g'mic Blend (seamless) My advice here is make the base layer active and set g'mic to Active layer and above. The preview for this filter is not wonderful and that gives an overall view.

Quote:The final result pic is supposed to fill that whole black box on the screen , not all moved over to the bottom right

(6) Well, that is what I get.

[attachment=6075]
I tried your instructions on my already partially done project and got the same bad result. Then I started from scratch making sure I did everything like you said and this time it worked. I like the unified transform tool and will use it from now on. 

I'm not sure why this didn't work on my  initial partially done project. Here's some of the things I've been doing. Some of those must be wrong. Instead of the unified transform tool. I tend to right click the active layer and choose layer/Scale layer.

 I like this because I can type a number in the upper box and then click on the lower box and it automatically puts in the number, so it doesn't distort the image. How can I prevent distortion with the Unified Transform Tool?

With your method after I dragged my base pic into GIMP, I hit Image -> Fit Canvas to Layers, but it didn't do anything. So is this unnecessary to do after I drag in the base pic?

I always use the regular Rotate Tool Shift-R and Move Tool M. In this failed instance I cropped the Face pic before I right clicked it and chose  "add layer Mask"

 Does it make any difference whether I right click, the actual image in GIMP or instead right click the active layer in the layers dock or choosing the upper menu Layer. 

I know many times I'm using pics with different resolutions and sometimes I have quite a few pics in there before deleting them to simplify the project. So does anything jump out to you that I'm doing wrong in regard to the finickiness of GMIC?