Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to edit a PNG File to change the colour
#1
Hi
I am a complete noob to GIMP so please be gentle  Big Grin 
I have a PNG file that shows the outline of a weapon in black and I would like to edit this and change the outline to blue.

How do I do this in GIMP?

I've attached the original PNG image.

Thanks in advance  Smile


Attached Files Image(s)
   
Reply
#2
After having your image open:
1.set FG to Blue

   
2.select-by-color clicking on any black pixel of your image

   
3.edit: fill with foreground color 
   
Reply
#3
(06-07-2020, 06:54 AM)dinasset Wrote: After having your image open:
1.set FG to Blue


2.select-by-color clicking on any black pixel of your image


3.edit: fill with foreground color 

Sorry, but no. The "Select by color" make not difference between fully opaque pixels and the partially transparent ones that make the smooth edges, so everything is fully selected, and your partially transparent pixels are fully repainted, creating  a pixellated edge.

A correct way is to just set the alpha-lock on the layer (checkerboard icon in he "Lock" line) and bucket fill without selection. Then the partially transparent pixels remain partially transparent and the smooth edges are kept. Another correct way is to use "alpha-to-selection", and bucket-fill
an empty layer (not  bucket-fill over the existing layer).

   
Reply
#4
I see, thanks Ofnuts.
What about shrinking by 1 the selection obtained thru select by color before filling?
I ask this because the std select by color tool uses the option antialiasing, which says it smooths the selection.
I tried and it seems (well: it seems to my eyes) that the result is equal or very similar to using alpha to selection...
Just to know, thanks.
Reply
#5
(06-08-2020, 05:14 AM)dinasset Wrote: I see, thanks Ofnuts.
What about shrinking by 1 the selection obtained thru select by color before filling?
I ask this because the std select by color tool uses the option antialiasing, which says it smooths the selection.
I tried and it seems (well: it seems to my eyes) that the result is equal or very similar to using alpha to selection...
Just to know, thanks.

If you shrink the selection you don't paint the edge pixels, and they keep their color. It is more visible with some colors (here, green repainted in red):

   
Reply
#6
Thanks guys
unfortunately as I said I am a complete noob so I have both the windows open (image attached) but where do I change the colour?

Thanks


Attached Files Thumbnail(s)
   
Reply
#7
Quote:unfortunately as I said I am a complete noob so I have both the windows open (image attached) but where do I change the colour?

Never a good idea for 'complete noob's' to change the default Gimp interface until they get to grips with the Gimp tools.

My advice, Edit -> Preferences -> Window Management and click on Reset Saved Window Positions to Default Values

If you are in the old multi-window mode, can be ok but these days most prefer Windows -> Single Window Mode

Then it goes like this https://i.imgur.com/39kVCLB.mp4 Wink
Reply
#8
(06-08-2020, 11:35 AM)rich2005 Wrote:
Quote:unfortunately as I said I am a complete noob so I have both the windows open (image attached) but where do I change the colour?

Never a good idea for 'complete noob's' to change the default Gimp interface until they get to grips with the Gimp tools.

My advice, Edit -> Preferences  -> Window Management and click on Reset Saved Window Positions to Default Values

If you are in the old multi-window mode, can be ok but these days most prefer Windows -> Single Window Mode

Then it goes like this https://i.imgur.com/39kVCLB.mp4   Wink

You sir are a legend !!

Thank you to everyone for helping this noob  Heart
Reply


Forum Jump: