2

I have a png file in GIMP and I want to add a transparent margin 25% of the width around the figure. How can I do that?

3
  • Hi. Welcome to GDSE. What do you mean by "around the figure"? What kind of figure? Do you want to add a margin by increasing the size of the original, or do you want to delete part of the image to make it transparent?
    – Billy Kerr
    May 14 at 16:31
  • @BillyKerr: Thanks Billy for the comment. Actually the figure should just be in the middle of the image and around the figure there should be a transparent margin of 25% of the widht. So the original figure (which is a house) has the shape of a rectangle and should be centered and around the rectangle there should be the margin.
    – VanessaF
    May 14 at 16:36
  • I'll ask again. Do you want to increase the image size by adding an additional transparent margin or create a transparent margin by deleting part of the image? Can't answer this properly without knowing which. If you can't explain this, share an image showing what you want to do.
    – Billy Kerr
    May 14 at 16:44

1 Answer 1

2

Image > Canvas size. And since you want a 25% margin, you want the canvas to be 50% bigger, so you can make Gimp compute it for you:

enter image description here

Another solution with Gimp 2.10 is to use the Crop tool with the Allow growing option set and the Delete cropped pixels unset. This gives more freedom on the canvas position, but there are fewer options to resize/fill layers.

enter image description here

10
  • Thanks a lot xenoid for your answer. How can I shift the image a little bit more to the left (or right) with you approach. Unfortunately, the Offset always sets back the changes values to 0
    – VanessaF
    yesterday
  • @VanessaF "the Offset always sets back the changes values to 0" : what values? As far as I can tell the Offset does what it should do... (unless you think it is an adjustment to the position you have set in the image widget, but it's not).
    – xenoid
    yesterday
  • Thanks for your comment. If I just open the canvas size of the image and then play around with the offset, it does not change anything as it always changes the values to 0. So how can I shift the figure a little bit more to the left? In my case this is not possible with the offset option so I need to find another way
    – VanessaF
    14 hours ago
  • So you want to increase the canvas size but still have the left part of the image outside of the canvas?
    – xenoid
    13 hours ago
  • I just want to shift the main figure a little bit to the left after or while increasing the canvas size
    – VanessaF
    13 hours ago

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.