Post Reply 

how to add border to PNG file

Jan 19, 2012, 15:25
Post: #1
how to add border to PNG file
I'm in the process of learning to use GIMP (& what a process--great program!) & need to be able to add a border around a PNG graphic, detail as follows:

1. Graphic is rectangular w/transparent background
2. Need to add a border around to match colour of graphic, &
3. (this is where I've hit the wall) The graphic isn't centred within the edges of the graphic "frame", ie: there's the pic part of the logo with text beneath, the text is closer to one edge of the "frame" than the other. Dodgy

That item 3 above is the problem--otherwise it seems I could easily use the Filters-->Decor-->Add Border filter & make folks happy.

Any guidance is greatly appreciated, as this is the beginning of a process--after the PNGs, I have WMF, EPS & TIFF formats waiting for the same.

Many thanks!
Find all posts by this user
Quote this message in a reply
Jan 19, 2012, 16:00
Post: #2
RE: how to add border to PNG file
What you need to do isn't too clear. If i understand:

1) your have a rectangle with contains text and a rectangular graphic/logo
2) you want to add a border to the graphic logo
3) this border is a color that matches the logo, so that would just enlarge it.

Is that correct?

By the way, I think you are doing all this the wrong way. EPS and WMF are "vector" graphics and for pure text/logo they are much better than bitmap graphics (PNG/TFF). The right way to tackle you problem is to get back to a source "vector" image. It shouldn't be hard to reconstruct one using the EPS and a vector graphics editor such as InkScape (the original may have been done using Adobe Illustrator). You then edit this file to your liking, keep it as an InkScape project, and export to the required formats as needed (PNG/TIFF/WMF/EPS/SVG and what else). Note that the very useful advantage of vector graphics is that, unlike bitmaps, they can be scaled up and down without loss of quality. You can even get perfect font rendering at all sizes (a size 50 font isn't exactly a size 25 with a 2x blow up).

Besides, I'm pretty sure that Gimp won't export true EPS/WMF. True ones will rescale perfectly, those from Gimp may just pay lip service to vector graphics and contain an embedded bitmap that will not rescale.

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Jan 19, 2012, 16:32
Post: #3
RE: how to add border to PNG file
Thanks for the speedy reply! Let's see if I can clarify...
1. The logo is a combination of a round image & text, all made into one tidy lump graphic. The whold combined area is rectangular in shape (with the background being transparent).
2. This rectangular "unit" is what needs to have the border added, including all the transparent area--effectively boxing in the image & text together. The text is closer to the edge of the rectangle on one side than the other, making the nifty Add Border not an option--with the transparent bkgd it's not an issue, but throw a border on & the imbalance really shows.
3. Border colour to match one colour of the graphic (this part shouldn't be hard, I think).

FWIW, I agree wholeheartedly about vector being superior (I've used something very similar to your "50 pt does not equal 25 pt x2" logic here, actually); however, we don't have a program capable of vector edits & many folks here are afraid of anything but the familiar PNG (hey, I've had to fight to get them there as opposed to JPG). So work with the bitmaps I must.

(Wondering if I still have a copy of CorelDRAW floating about at home, but for the moment, I have to work with what I have here...)

Hopefully I've made a better picture for you? Pls advise & many thanks!
Find all posts by this user
Quote this message in a reply
Jan 19, 2012, 17:26
Post: #4
RE: how to add border to PNG file
For vector graphics, InkScape is free (same league of Open Source Software as Gimp). And who uses WMF these days, the right format for logos is SVG Smile

Back to Gimp. If you want to make a rectangular frame:
- start the rectangle selection tool (Rectselect)
- make a rectangle for the inner border of the frame
- "Select/Save to channel"
- make a rectangle for the outer border of the frame
- Open the Channels dialog, right click on the Saved selection, and "Subtract from selection"

You now have a selection on the frame, you can bucket-fill it.

You can make that easier by using guides, with a first set defining the outer rectangle and the other the inner one. Check "View/Snap to guides". In this case the procedure above can be shortened:
- Select the outer rectangle
- Press and hold the Control key: you will have a "minus" added to your pointer icon
- Select the inner rectangle. This subtracts your second selection from the first one, leaving you with a rectangular border.

Both methods can really be used with or without guides, but guides aren't too useful in the first one, while they avoid much frustration in the second one.

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Jan 19, 2012, 20:15
Post: #5
RE: how to add border to PNG file
VERY cool Cool

Many thanks for the step-by-steps--will try them as soon as I can get back to that project (one of several "top priority" things). Extra thanks for the heads-up on open-source vector program, which is downloading as I type.
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  nothing works from the File menu, can't save, export, close, etc jperiod 1 40 Aug 3, 2017 05:19
Last Post: ythgilb
  How do you add effects? ead 1 51 Aug 1, 2017 05:04
Last Post: ythgilb
  Saved file, can no longer interact with image Tatsuno 5 250 Sep 28, 2014 21:54
Last Post: iForStyle007
  add blank area to right-hand side of image pdc_2 3 258 Sep 11, 2014 20:57
Last Post: pdc_2
  Add black shade to my photo brody31 3 300 Sep 9, 2014 05:19
Last Post: brody31

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS