Home
» LINUX
»
How to Cut Out an Image on Linux with GIMP
How to Cut Out an Image on Linux with GIMP
To cut out a subject on Linux, open the photo in GIMP, trace the subject with the Free Select tool, invert the selection, and delete the background. Add an alpha channel first and export the result as a PNG so the area around the subject stays transparent. This method works best for objects with a clear outline; fine hair and soft, see-through edges need more detailed cleanup.
Install GIMP or open it from your app menu
If GIMP is not installed, use your Linux distribution’s software center or follow the current official GIMP downloads page. As of October 26, 2026, that page lists GIMP 3.2.6 as the current stable release. Its Linux instructions include Flatpak; on a system with Flatpak, the official install command is:
Package names and available versions vary by distribution, so use your distro’s package manager if you prefer its maintained package. Launch GIMP from the application menu after installation.
Cut out the subject in GIMP
Open the photo. In GIMP, choose File > Open and select the image. Save a working copy as an .xcf file with File > Save As; XCF preserves GIMP layers for later edits.
The photo is open in GIMP before you start selecting the subject.
Make a separate working layer. Choose Layer > Duplicate Layers (Shift+Ctrl+D). In the Layers dock, click the eye beside the original layer to hide it, then keep the duplicate selected. This preserves the untouched photo and prevents it from showing through after you delete pixels. GIMP’s Duplicate Layers documentation describes the command.
Work on the duplicate layer and hide the original layer before removing the background.
Add transparency support. With the duplicate active, choose Layer > Transparency > Add Alpha Channel. If the command is unavailable, that layer already has an alpha channel. An alpha channel stores transparency; GIMP documents this under Add Alpha Channel.
Add an alpha channel before deleting the selected background.
Choose Free Select. Select Tools > Selection Tools > Free Select, or press F. Zoom in enough to see the subject’s edge. In Tool Options, enable Antialiasing for a smoother boundary. The official Free Select guide explains its polygon and freehand modes.
Trace close to the plant’s outline, following its leaves and pot.
Trace and close the outline. Click around the subject to make a polygon, placing more points around curves and fewer along straight edges. To draw a freehand section, click and drag. Return to the starting point to close the shape, or double-click to close it with a straight segment. Press Enter to confirm the selection if it is still in edit mode.
Check that the selection forms a closed outline around the complete subject.
Invert the selection. The subject is selected, but you want to remove the area outside it. Choose Select > Invert or press Ctrl+I. The moving selection border should now run around the canvas edge and the subject. See GIMP’s Invert selection instructions if you need the menu location.
After inversion, the background outside the plant is the selected area.
Delete the background and inspect the edge. Press Delete. You should see GIMP’s gray checkerboard around the subject, which indicates transparency. Choose Select > None to remove the selection outline. If the plant disappears, undo with Ctrl+Z and invert the selection before deleting again. If the old background remains visible, confirm that the duplicate layer is active, the original is hidden, and the active layer has an alpha channel.
The checkerboard around the plant shows that the deleted area is transparent.
Export as PNG. Keep the XCF working copy, then choose File > Export As. Enter a filename ending in .png, choose PNG if GIMP asks for a format, and click Export. PNG supports transparency; JPEG does not. GIMP’s PNG export documentation lists the format options.
Use a .png filename and the PNG image format to retain transparency.
Fix common cutout problems
The background turns white instead of transparent
First check that the duplicate layer is active and that the original layer underneath is hidden. Then undo the deletion, add an alpha channel if needed, and delete again. A checkerboard in GIMP is the usual sign that the layer has transparent pixels; another image viewer may display transparency over a white page, so test the exported PNG over a colored background.
The subject has rough or jagged edges
Zoom in and refine the selection with more points around curves. Keep the Antialiasing option enabled. Avoid feathering unless you want a deliberately soft edge: too much feathering can make the subject look blurry. Free Select is useful for a rough cutout, but GIMP notes that it is not ideal for precise edges; for hair or complicated outlines, refine the result with Quick Mask or a layer mask instead of expecting a perfect one-click selection.
The exported file has no transparency
Export a PNG rather than JPEG, and make sure you used Export As with a .png filename. Keep the XCF file as your editable master so you can adjust the outline or restore the original layer later.