How to crop objects with transparent parts from an image - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions) +--- Thread: How to crop objects with transparent parts from an image (/Thread-How-to-crop-objects-with-transparent-parts-from-an-image) |
How to crop objects with transparent parts from an image - NeonPirate73 - 09-22-2019 I want to crop objects which have transparent parts from the background of some images, but I don't know how. Every tutorial I have found has only been for cropping out fully opaque objects from an image. Does anyone know a tutorial or any tips for how to do this? RE: How to crop objects with transparent parts from an image - Ofnuts - 09-22-2019 Can you show an example? Normally you don't really care about transparent parts... RE: How to crop objects with transparent parts from an image - NeonPirate73 - 09-22-2019 As an example, what if I wanted to change the background of this image: RE: How to crop objects with transparent parts from an image - Ofnuts - 09-22-2019 Tough one but not undoable. You first need to create a selection that covers everything but the completely opaque parts of the helmet, and so includes the glows and the translucent parts. No magic bullet to do it in one go. If you are skilled with the Path tool, you can create an outline path. This is some work, but on CGI graphics this is not that hard. It can also be handy later in your editing. Otherwise, you use the fuzzy selector to select the background, and then amend the result with the Quickmask . With the quickmask you literally "paint" the selection, in white where there should be one, and in black for no selection. What is selected keeps the original color, what is not assumes a reddish color. So you will mostly paint white over the yellow eye mask and the glows, and black where the background selection has entered parts of the helmet. Use a soft brush, and this is bets done with a tablet. In the end you should have something like this: [attachment=3181]
Then exit the quick mask, Select>Grow the selection by 2 pixels, make sure the layer can be transparent (Layer>Transparency>Add alpha channel) and use Color>Color to alpha to remove the background color (you can sample it, there is a color picker button in the C2A dialog). You should get something like this: [attachment=3182]
You can insert a temporary layer with a pattern or a contrasting color to check the result:
[attachment=3183]
Note: done in 10mns just before bedtime, painting with the mouse, so far from perfect. RE: How to crop objects with transparent parts from an image - NeonPirate73 - 09-24-2019 Got a chance to try out your method, and it works! Thanks for the help! |