Home Technical Talk

Oddities with Photoshop and Making a Mathematically Accurate Grayscale Map

I'm having some odd problems with Photoshop. I need to make a image with precise values in certain quadrants. I have an RGB, 8bpp 1024 map broken up into a 5 by 5 grid of black-to-white value swatches. I need each swatch to be a precise value from 0 to 255. Then I want to take this image as one channel (still with these EXACT values) and insert it into another texture's Green channel.

So here's the scenario. I pick the color 16,16,16 from the color picker, marquee select the swatch I want at this color, then fill area. I go back to the color picker to ensure it is truly at 16,16,16 and it is. Hooray.

However, when I select one individual channel the image shifts slightly. Using the color picker, I find that the values in the individual channels are NOT what I set them too. The area with 16 is now something like 13, and instead of every pixel being the same it has gotten noisy ranging from 12 to 14.

Not thrilled with this, I start with a Grayscale image with 8bpp. Now I pick the color 16,16,16 and fill an area with the color. Upon double checking, I found it actually painted it at a value of 15. WHY?!?! It's not just 16, other numbers do weird crap too. 20 becomes 21, 28 becomes 29, etc. But other numbers stay they same. I'd say it's almost 1 in 4 are messed up.

How do I get ONE channel with EXACT values in sets of 4 from 0 to 255?

Replies

  • Archvilell
    So if anyone else runs across this problem, I got it solved.

    I changed the image mode to "Indexed Color". It gives me just one channel to work with, and it lets me have every value I want. Once I created my 5x5 collage of swatches, I saved it out as a .BMP file. When I want to put this file into a channel, the best way is to open a new image document, under the Advanced options, change the Color Profile to "Don't Color Manage This Document". Drag the .BMP file onto the document from a Windows Explorer. Copy the layer and drop it in whatever channel you want it in. If you use the Info pane, you should see the color should stay at whatever indices you set it to.

    Hope this helps anyone who's had this problem too.
Sign In or Register to comment.