4

Using Gimp, I am working on a sprite image made of lots of icons, each on a separate layer. I would like to check that there is no overlap by displaying the outline of all layers.

There is an option "Show Layer Boundary" but it only shows the outline of the layer currently selected (and I can select only one layer at a time.

Is there a way to show the outline of all layers, or to select multiple layers at once?

2 Answers 2

2

There's not a way to directly do what you ask, to my knowledge. There is a way to "link" layers (click next to eye in layers dialog), but this linkage seems to cause only movement (dragging) to operate on the group of layers; all other operations continue to work on a single layer.

If what you want is to see if the rectangular boundaries of each layer overlap any other layer's boundaries, you may be able to do so with some preparatory work. You add a "layer mask" to each layer concerned, probably all white (meaning opaque). You turn off visibility of any background layer so that the gray check pattern of transparency will show. You can then show for each layer the white rectangle where the layer exists by alt-clicking the mask icon in the layer dialog (which appears next to the image icon when the mask is created). Do this for all the layers concerned and see if the rectangles overlap. (alt-click again to go back to normal layer image display.) Basic mask operations are covered in Gimp docs 7.21 - 7.26.

2
  • Thanks for the detailed answer. I discovered afterwards that having no overlap is not sufficient, a 2px margin between images is required to avoid adjacent icons to show as blurred artifacts on the side of sprite icons at high zoom level or some odd screen resolutions in IE. I guess that I would need a more specific plugin to help for this kind of check for the creation of a sprite image.
    – user247
    Commented Feb 12, 2011 at 18:06
  • I found that multiple layers can be selected depending on the tool. For example, shift+click allows to select multiple layers using the Align tool. Sadly: only layer corners get highlighted.
    – user247
    Commented Feb 14, 2011 at 10:12
2

From Gimp documentation:

5.10. Show Layer Boundary

The Show Layer Boundary command enables and disables displaying the yellow dotted line that surrounds a layer in the image window. The dotted line is actually only visible when the layer is smaller than the image window. When the layer is the same size as the image window, the layer boundary is obscured by the image border.

You can set the default for the layer boundary in the Image Window Appearance dialog.

5.10.1. Activating the Command

You can access this command from the image menubar 

through View → Show Layer Boundary.

2
  • Yeah, but this does still only show (or hide, if deactivated) the layer boundary around the currently active layer. Commented May 20, 2015 at 16:32
  • Oops, I see what you mean, still thats the closest i could easily come to... will leave this here cause though as you say its for "show boundary layer in Gimp"
    – ntg
    Commented Dec 1, 2015 at 10:49

Your Answer

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