It is currently Sat Jun 22, 2024 8:47 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Change color of outermost border pixels?
PostPosted: Sun Oct 23, 2011 3:47 pm  (#1) 
Offline
GimpChat Member

Joined: Sep 09, 2011
Posts: 21
GIMP Version: 2.6.11
Operating System: Windows
OS Version: win7
GIMP Experience: Beginner Level



Greets,
I have an image "Welcome-02.png"
Attachment:
Welcome-02.png
Welcome-02.png [ 14.2 KiB | Viewed 8340 times ]

for which. i would like to change the color of its outermost border pixels,
to "50057B",
no matter what that color is (mostly its color is "F4F2EE", but not always).
How can i change those outermost pixels?
Thanks...vmars316 Vernon

_________________
"All things in moderation , except for love and forgiveness ."


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Change color of outermost border pixels?
PostPosted: Sun Oct 23, 2011 4:02 pm  (#2) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
I downloaded your image and saw right away that it had been semiflattened with white even though it was a png image. Is it the white pixels you want to get rid of? If so, this is what I did.

  1. Open the image
  2. Right-click the layer the image is on and select, Alpha to Selection in the dropdown list.
  3. Select > Shrink > 1
  4. Select > Invert > Color to Alpha. Make sure white (ffffff) is the color in the color box.
  5. White pixels gone.
  6. Select > None.

I put a red background behind the image to show the white semi-flattening.
Image

There are also some very dark purple lines outside some of the letters. They can be removed also in the same way but you will need to use the color picker first to get the correct color to put in Color to Alpha. I got color #50057b.

Here is a zoomed in screen shot showing some of them.

Image

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Change color of outermost border pixels?
PostPosted: Sun Oct 23, 2011 7:25 pm  (#3) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4050
Following O's advice then using Rob A's transparent background script to get a decent selection, which is saved to a path, and used to stroke on a transparent layer.

Image

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Change color of outermost border pixels?
PostPosted: Mon Oct 24, 2011 11:34 am  (#4) 
Offline
GimpChat Member

Joined: Sep 09, 2011
Posts: 21
Oregonian wrote:
I downloaded your image and... Is it the white pixels you want to get rid of?
...There are also some very dark purple lines outside some of the letters.


Actually, i want to replace all the white-ish (border) colors with the color #50057b.
The purple(#50057b) pixels, i put there, replacing pixel by pixel white-ish with #50057b.
I want a purple border around each letter.

Flattened, hmm... must have happened when I copied it to the clipboard, then to file.
See this one: no white,
Attachment:
Welcome-3.png
Welcome-3.png [ 14.77 KiB | Viewed 8264 times ]

but now my needs change a little bit.
I now want to ADD a '1 pixel border' around the perimeter of each letter.

What you described sounds interesting, I'll try it later.

Thanks...Vernon

_________________
"All things in moderation , except for love and forgiveness ."


Top
 Post subject: Re: Change color of outermost border pixels?
PostPosted: Mon Oct 24, 2011 12:00 pm  (#5) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
vmars316 wrote:
I now want to ADD a '1 pixel border' around the perimeter of each letter.
The one mahvin did has a purple border around it.

I downloaded Welcome-3.png, did alpha to selection, Select > To Path. Unselected (Ctrl + Shift + A).

I put 50057b (purple) as the foreground color.

Edit > Stroke Path. (See image below)

Image

welcome-4.png has a 1-pixel purple border around it.


Attachments:
welcome-4.png
welcome-4.png [ 18.02 KiB | Viewed 8257 times ]

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein
Top
 Post subject: Re: Change color of outermost border pixels?
PostPosted: Mon Oct 24, 2011 5:01 pm  (#6) 
Offline
GimpChat Member

Joined: Sep 09, 2011
Posts: 21
Oregonian wrote:
I downloaded Welcome-3.png, did alpha to selection, Select > To Path. Unselected (Ctrl + Shift + A).
I put 50057b (purple) as the foreground color.
Edit > Stroke Path. (See image below)
Image
welcome-4.png has a 1-pixel purple border around it.


Very COOL "O". Ive never used the ToPath or StrokePath before.
Thanks

Oregonian wrote:
The one mahvin did has a purple border around it.


Ah yes, I am working on that one now.
Thanks...Vernon

_________________
"All things in moderation , except for love and forgiveness ."


Top
 Post subject: Re: Change color of outermost border pixels?
PostPosted: Mon Oct 24, 2011 11:09 pm  (#7) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Hi vmars316.
You can also do this by selecting the layer of text that has transparency, right click the layer, and select "alpha to selection".Then go to Select . Shrink (shrink by width you want colored differently) Select> Border
Enter your width in pixels - you can now select another foreground color and a new layer.
Fill in the selection.
If you just want a border around existing pixels - select lock selection to image edges.(the border will be outside)
If you want to change existing pixels around the text with a gradual color change select feathering.
If you want to change existing pixels around the text - select nothing (clear all the selection boxes).

This is the way i usually do a border around text because it allows you to save the changed border on a new layer (non-destructive) . :)

Image

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Change color of outermost border pixels?
PostPosted: Tue Oct 25, 2011 2:45 pm  (#8) 
Offline
GimpChat Member

Joined: Sep 09, 2011
Posts: 21
Geez Rod!
Downright Amazing:
1)
Starting with "fsWelcome-3-FlowerLetters-2-0.png" (fs = captured with FastStone)
Attachment:
fsWelcome-3-FlowerLetters-2-0.png
fsWelcome-3-FlowerLetters-2-0.png [ 11 KiB | Viewed 8204 times ]

alpha to selection
Enter your width in pixels - you can now select another foreground color and a new layer.
Fill in the selection.
"fsWelcome-3-FlowerLetters-2-1.png"
Attachment:
fsWelcome-3-FlowerLetters-2-1.png
fsWelcome-3-FlowerLetters-2-1.png [ 4.62 KiB | Viewed 8204 times ]


2) border around existing pixels:
Starting with "Welcome-3-FlowerLetters-2.png"
Select/Grow 1 pixel
select "lock selection to image edge" / BorderPixel=1
Fill Selection with #"50057b"
"Welcome-3-FlowerLetters-2-2.png"
Attachment:
fsWelcome-3-FlowerLetters-2-2.png
fsWelcome-3-FlowerLetters-2-2.png [ 6.66 KiB | Viewed 8204 times ]


3) If you want to change existing pixels around the text with a gradual color change select feathering.

4) If you want to change existing pixels around the text - select nothing (clear all the selection boxes).

Thanks Rod,
sorry to say I couldn't get #3 or #4 working.
I can't figure out when to do what.
...Vernon

_________________
"All things in moderation , except for love and forgiveness ."


Top
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Background color chanage and typed text color change

8

No new posts Change foreground and background color

2

No new posts How do I change context menu text color in my theme?

0

No new posts Attachment(s) Default to inches instead of pixels

3

No new posts Select Layer by Pixels

2



* Login  



Powered by phpBB3 © phpBB Group