I want to make a layer in gimp, that is just an image that doesn't cover the whole background, but I don't want the rest of the layer to be a transparent surface. I want the layer to end with the image of, say, a dog or a basketball, without any transparency around it. How do I do this?

Edit: To clarify since many misunderstood what I'm looking for, I want the layer to stop with the outline of the figure, beyond which you cannot draw on that layer.

  • Something like Transparency > Remove Alpha Channel?
    – Takkat
    Feb 6, 2017 at 7:01
  • Removing the alpha channel only made the transparent area fill with background color Feb 6, 2017 at 22:50

4 Answers 4


If you want to paint on a shape without "spilling" on the transparent pixels that surround it, then use the alpha-lock. This is the checkerboard icon in the "Lock" line at the top of the Layers list. When the alpha-lock is set for a layer, the opacity of the pixels cannot be changed, and paint operations will only apply to non-transparent pixels. You can even bucket fill the layer without a selection to change the shape color.


Layer>Autocrop Layer removes the largest possible area around the outside edge which all has the same color.

  • It only makes a square selection, what I'm looking for is along the figure's outline Feb 6, 2017 at 22:51
  • Then I don't understand what you want. A layer is rectangular. You can't have a layer which is any random shape. What you can have is any random opaque shape in rectangular layer, with the rest of the mayer filled with transparent pixels. However see my second answer...
    – xenoid
    Feb 7, 2017 at 0:38

Image->Canvas Size allows you to set the image size in an independent way from the layer size. On exporting a PNG, the image size is used.

Please note that due to the way GIMP exports images, all transparent pixels, including those in the layer, will have their RGBA values set to (0,0,0,0) before saving - that might make the borders of non-transparent contents apear dark, depending on where you are using the output image.

The only way to avoid that in current GIMP is if you are exporting an image that is single layer that is the exact image size, or use the programatic PDB calls - check https://bugzilla.gnome.org/show_bug.cgi?id=777704


If you want to avoid transparency around the figure you can just create another layer filled with solid color under your figure.

  • That won't do, I want to be able to draw on the layer with the figure without having it go outside the edges of the figure, so there can't be any transparency outside of it Feb 6, 2017 at 20:08
  • well, I didnt get you right. I guess xenoid has answered your question Feb 6, 2017 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.