Basically I would like to make the layer boundary size content-aware so it will always fit and never limit content to spread.

Example A (Default GIMP Behavior): Here the layer "Layer" has the same boundary size as the canvas no matter if is just one pixel of non-transparent content or the full layer.

enter image description here

Example B: Here the layer "Layer" has the boundary size of its drawn (non-transparent) content. And If I just kept using the brush towards any direction the layer (and consequently the canvas would scale), in red was the layer boundary when I first draw something, and in blue (and the right and bottom red box) would be after a second draw has been made.

enter image description here

This was brought to my attention when I unsuccessfully tried to move a content to snap to a guide rule, however it only snapped to the layer boundary and not to the content.

  • 1
    Hi. Welcome to GDSE. Not sure I've understood your question fully, but perhaps you are looking for Layer > Crop to Content? GIMP won't set the layer boundary to the content unless you tell it to.
    – Billy Kerr
    Commented Dec 3, 2021 at 16:32
  • So @BillyKerr that is almost what I want, it does set the layer boundary to the content, however I cannot expand the content further away from the new boundary, it will crop the layer and I'm unable to expand it. What I need is something like that Crop to Content that will dynamically change. Maybe I'm missing something or it isn't possible to do in GIMP, if so I'll try to do something about it using the source code, but I'm checking if right now it is possible.
    – João
    Commented Dec 3, 2021 at 20:36
  • I've added an answer now.
    – Billy Kerr
    Commented Dec 3, 2021 at 20:58

2 Answers 2


There's no way to have the layer size change dynamically as far as I'm aware (except for dynamic text boxes). In GIMP the layer size is independent from the content on the layer. The two are unrelated. Also snapping to guides or using the Alignment tool works using the layer boundaries, not the content.

Anyway, you can manipulate the layer size manually in a few steps.

  1. Do Layer > Layer to Image size

  2. Paint some extra pixels

  3. Do Layer > Crop to content

I suppose you could speed this up by setting up some shortcut keys for the commands in steps 1 and 3.


enter image description here

You can also use a selection to change the size of the layer.

  1. Make a selection

  2. Layer > Crop to Selection, then Select > None Shift+Ctrl+A to release the selection


enter image description here

  • Thanks for your clarification, I'll use these workarounds you suggested as it seems to be the way to go.
    – João
    Commented Dec 4, 2021 at 17:19

Hello but how can I save this setting for when I close it. and opening it again it resets the layer boundary size to the old one how can keep it on this size every time I close and open the image in gimp

New contributor
Gmaer1 is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

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.