Post Reply 

[Solved] Change all pixels of one value to a different value.

May 29, 2012, 14:08 (This post was last modified: May 29, 2012 15:43 by michaelrmgreen.)
Post: #1
[Solved] Change all pixels of one value to a different value.
I have a diagram scanned in one pixel mode (b&w). I want to change the line color from black to blue.

I tried this:
In the toolbox I altered the foreground color to blue. In the 'Select' menu I used the 'By color' option. I made sure the settings in the toolbox for 'Select by color' were set at default, then I clicked on a black pixel in the image. The black lines in the image became outlined with a dotted line. I then used the 'Fill with FG color' option from the edit menu. The sample color to the left of the menu item was blue. The image briefly 'repainted'. I removed the selection using 'Select' 'None' but the image lines remain black.

Thanks for any advice.
Find all posts by this user
Quote this message in a reply
May 29, 2012, 15:19
Post: #2
RE: Change all pixels of one value to a different value.
Make sure that the bucket-fill tool is in "Fill selection" mode (otherwise the bucket will fill only contiguous lines).

Otherwise you can bucket-fill the whole image, after putting the bucket-fill tool in "Lighten only" mode. All colors are lighter than black, but darker than white, so the fill will only replace the black.

PS: to remove the "marching ants" without losing the selection, use Ctrl-T to toggle the visibility of the selection.

PPS: if problem persists, post your image (or an extract) in PNG or XCF format.

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
May 29, 2012, 15:32 (This post was last modified: May 29, 2012 15:36 by michaelrmgreen.)
Post: #3
RE: Change all pixels of one value to a different value.
Thanks for your quick reply. I really appreciate it. Unfortunately the suggestion didn't help, the selection still filled with black, even though the thumbnail color (next to 'Fill with FG color') and the toolbox foreground color are both blue. I accidentally removed the highlight round the lines and clicked with the bucket fill tool again. Of course this filled the whole 'page', but again black not blue. I tried again with the background color and got the selected area filled with white (BG color set to blue of course).

It seems whatever I set the foreground (and background) color to I can only get black or white. Might this be a problem with the file format. It's a scan in one bit mode. Anyway, it's attached.


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
May 29, 2012, 15:33
Post: #4
RE: Change all pixels of one value to a different value.
Also make sure you have changed the image mode so it's not in indexed mode but in RGB, otherwise all you can paint with are black and white.

Kevin
Find all posts by this user
Quote this message in a reply
May 29, 2012, 15:37
Post: #5
RE: Change all pixels of one value to a different value.
Aha! I shall try that immediately....
Find all posts by this user
Quote this message in a reply
May 29, 2012, 15:42 (This post was last modified: May 29, 2012 15:45 by michaelrmgreen.)
Post: #6
RE: Change all pixels of one value to a different value.
Yes, that did it. Image -> Mode -> RGB. Thanks all.
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  "Open Image" change default folder and thumbnail view? Dave001 1 43 Aug 15, 2017 19:56
Last Post: ofnuts
  Change the space between lines of text ead 1 62 Jul 28, 2017 12:38
Last Post: ythgilb
  Change transparent background color Firion 1 141 Jun 14, 2017 05:24
Last Post: ythgilb
  Coping to different document without image size change Artist 1 133 Jun 11, 2017 11:38
Last Post: ythgilb
  [SOLVED]Weighted Blend in GEGL library mIXpRo 2 168 Oct 6, 2014 07:47
Last Post: mIXpRo

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS