The Hirsute One Hairy but harmless

Joined: 20 Jul 2006 Posts: 17795 Location: Croydon, Surrey, UK
|
Posted: Fri Jul 22, 2011 11:32 am Post subject: Section 3: Removing/replacing colours |
|
|
Q: How do I remove one particular colour from an image?
A: This only works on certain images with blocks of colour. JPEGs (.jpg files), for instance, tend to have graduated or speckled images and do not necessarily contain just a uniform colour.
To replace an area of colour you can use the “Fill” tool - select the colour you want for “Color 1”, select the “Fill” icon, position the icon over the area and click the left mouse button to floodfill that area.
It is possible to remove most of a JPEG background using the fill tool - zoom in to the image, use the “Color picker” to select the background colour and floodfill the area. You may notice lots of slightly different coloured pixels making up the background and, by selecting these one at a time with the “Color picker” and then filling (after using the “Color picker” the icon will revert to the previously used icon, in this case the “Fill”), repeating as required.
For .png or .bmp formats (normally used when filling is required) a single floodfill will usually do the job. (Copy and paste this image into to try for yourself).
Select any colour other than red and use the “Fill” option on a corner of the top image. This will instantly reveal the answer.
However, for the lower image, this doesn’t seem much help.
This is where you can “replace” a colour by using “erase” in conjunction with the right mouse button. Use the “Color picker” to select the background as “Color 1” and then choose any colour other than red from your palette as “Color 2”. This "replace" function changes all occurrences of "Color 1" to "Color 2" while any colours that may look the same but are in reality slightly different will be ignored.
Select the "Eraser" option, hold down the right mouse button and sweep the cursor over the lower image and you will see the answer starting to be revealed (you can change the size of the eraser brush to suit your preference). Holding the left button would erase everything, just leaving your chosen “Color 2” in its place but the right button only replaces the selected “Color 1”.
Eventually, you will have your answer.
This method of hiding details is quite simple – the background red has an RGB value of 255,0,0 while the text has a value of 253,0,0. So even though the reds may look the same, there is a very slight difference that is hardly noticeable to the human eye. In the lower image, this secondary red was used to create a border around the letters and thus prevent a single fill from revealing them.
This can be extended to use varying degrees of the same shade. On a first look, you will be able to see that this image is made up of slightly differing shades of blue.
By using the “Color picker” to select each shade in turn and then using “Edit colors” to check the RGB values you will see this difference – the first four boxes are 0,128,192 - 0,134,198 - 0,143,213 - 0,151,233. Not much help in solving a puzzle. Using the “replace” option you can quickly identify which boxes are the same shade (using a different colour for each shade) and the puzzle then becomes a simple substitution cipher.
So the transcribed string is A BCDE CF GHI HAFE CJ KLDGH GKL CF GHI BMJH (which decodes to "a bird in the hand is worth two in the bush").
Multiple shades can be used as a different way of hiding things. This image contains a hidden word.
You can't see the hidden word or even identify easily which squares are the same colour. It's also very small and fiddly to manipulate. There are four shades of dark blue used, so to make it easy to see how this works, here is the same grid repeated four times together with the colours needed in larger boxes beneath each.
Using the “Color picker”, select the first shade of blue as “Color 1”. Select the Eraser and, holding down the right mouse button, move it over the first of the 4 grids. Repeat the same process for each of the 4 grids, selecting each shade of blue in turn.
Now you can see the hidden word very clearly in the fourth box while the other three shades of blue were just there to disguise it. |
|