Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
change all "white" to red in jpeg
#1
My daughter has drawn a picture on white paper using a very fine black pen. It is a complex forest but for the purposes of this question we may as well imagine that she has drawn a fine grid of squares, each a few millimetres wide, on a piece of A4 paper (210x297mm). If we scan the picture with a scanner we will be able to turn it into a jpeg (or a pdf) and open this jpeg in gimp 2.10.

She has made pictures like this in the past and then changed all the white to red using the "fill" functionality of gimp, carefully going through individual areas and clicking on each. But in this situation there are so many small areas that she will clearly be better off using some sort of automation. She wants all the "white" of the jpeg (which will of course translate to many slightly different RGB colours) to turn red (my understanding is that she would be fine if all the red were precisely FF0000). So basically she wants to look at every pixel and decide whether it's nearest to "white" or "black" and turn all the white pixels red.

Can this be done in Gimp 2.10?

If the correct answer to this is "look in the manual" then I apologise, please point me to the right place. We have only just started using Gimp and it is a huge piece of software which she is attempting to learn by doing and I'm attempting to help even though I know very little about the software.
Reply
#2
You might get pointed towards the Gimp manual if it leads to better understanding. Not often you do not get some sort of answer.

Scanning. I would avoid jpeg if possible. That is a lossy format and can introduce edge artefacts and from your description of the drawing, might be best avoided. Scanning software often has a tif option, uncompressed is a much bigger file size that jpeg, and scan at a decent pixels-per-inch ( ppi or dpi) 300 ppi is good quality. Open a PDF in Gimp and the default whatever scanned in is 100 ppi. Change that to suit in the import dialogue.

If you can attach a small part of the scanned image, you will get a better answer. 

However if you scanned greyscale, change to RGB Image -> Mode RGB.  Add a new layer over the top Layer -> New Layer. Set the foreground to red, bucket fill and set the layer mode to multiply

   
Reply
#3
This sounds like a job for Color to Alpha. There are a lot of good tutorials out there that can go into more detail, but for the purpose of what you're describing, this quick video should get you going.

Make sure your image has an alpha channel, or add one as I did in the video by Right-Clicking the layer and adding it from the menu. If this isn't giving you the results you want, post the image and we can help further. Each image is unique and may require some different approaches to get the desired results.



Reply
#4
Thank you both so much!

The original picture (jpeg -- my scanner cannot scan to tiff -- would pdf be any better?? I am assuming not) is here: https://wwwf.imperial.ac.uk/~buzzard/docs/SCAN0020.JPG . We'll try these techniques and see what works!

Added later: so my daughter followed the video (that's what kids like, right?), spent 5 minutes fiddling with brighness/contrast/whatever, and has now got the image exactly as she wanted. Many thanks indeed!
Reply
#5
Not sure the effect you are looking for in the end, but you might want to adjust your levels a bit. Making the whites a bit whiter would make the paper texture disappear and possibly make the blacks a bit deeper. It really just depends on what you are looking for. 

This is with the levels adjusted a bit.


[Image: red.jpg?dl=1]
Reply
#6
Gorgeous drawing !
Reply


Forum Jump: