What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Changing brightness/intensity without changing color map


Thesimp

Member
Messages
6
Likes
0
Hi
I'm trying to brighten or change color intensity of a set of indexed tiffs with RGB palette. All the tiffs are composed of red channel only, aka all green and blue values of color map are 0.
By simply using image->adjust-> brightness/contrast or level then save, the underlying color map changed.
Is there a way to change brightness by assigning new pixel values to the same color map instead? or any other methods that retain or later assign the same color map?
I have matlab and other scripting tools available.

Thanks in advance.
 
Hi @Thesimp

With the tools you have available there is a way to Save the Indexed Color Map, adjust the pixel values and and Reload the Color Table for use with that particular image.

Yet before going through those pushups, there might be an easier way to achieve you objective if you could describe what you are trying to achieve exactly.

Without knowing the details, let me first give you a path to try and see if this is useful (if not, I can provide the steps to modify the Color Table outside of Photoshop.

- First, load you TIFF file into Photoshop
- Next, change the mode from Indexed Color to RGB (all 8 bits still) (Use the Image > Mode command
- Use adjustment Layers to create to change the brightness or anything else you want
- Covert the Mode back to Indexed. When you do this you have quite a few options of what type of Color Table to create (ask if you need help)
Save the file in whatever format desired (e.g. TIFF)

I will wait for more details on what you are trying to achieve

John Wheeler
 
Thanks for the prompt reply,

I've attached a source image, and cdata and colormap of it
I believe its of 256 colors in RGB palette profile


After RGB and adjustment, all the options in flattened the layers when converting back to index either gave RGB profiles (exact) or fuzzy haze like colors (windows which are of 256 colors).
Anyways all the options I've ran through did not preserve the original color map
 

Attachments

  • sc.txt
    5.8 KB · Views: 1
Thanks @Thesimp
You additional information and files helped me understand your problem.

My understanding is that each and every TIFF file used the exact same Colormap which is just all shades of pure red (green and blue are zero) so the color table goes RGB values 0,0,0 to 255,0,0 1 bit at a time (for a full 256 full table) and no transparency involved.

For all of your attempts, no matter how you change the image the Colormap is not preserved with is important to you (not sure I know why yet that is not important).

There may be a more elegant way to do this yet I believe I have a solution that I believe works yet you will need to try it out to verify. I will include that step by steps with screen cut and pastes.

Note that there are many ways to make adjustments in Photoshop and that if you want the image you are adjusting that is only using the Red Channel, then you must also be careful not to make adjustments that introduce non-zero values in the Green or Blue channels. If you do, the image you see on the screen will not represent what gets saved with a all Red Color Table. If you need help with how to insure this, just let me know. Using Layer Styles you can turn off the off the Green and Blue channels so it is a non issue yet for now, I will assume you are fine making adjustments and don't need this help unless you ask.

So here are the steps that you can take.

First when you load you image here is the sample image you provided with its indexed color table:

Screen Shot 2021-12-13 at 8.41.57 PM.jpg

- The first thing you do is use the Save function on this panel to save the Color Lookup Table. Just save it to a location where you will be reloading it later in this process.

- Change to RGB mode as the next step (Image > Mode > RGB Color.

-I changed the image by using just the a Cruves Adjustment Layer adjustment Layer and I duplicated that adjustment Layer to really make the background come out.

Screen Shot 2021-12-13 at 9.46.47 PM.jpg


- Now if I just converted by to Indexed Color mode with a typical settings. Note that in the panel it shows it only needs 38 colors and is not using the original Color Table.

Screen Shot 2021-12-13 at 9.47.34 PM.jpg

- This is the Color Table for the new image:

Screen Shot 2021-12-13 at 9.53.07 PM.jpg

That is not what is wanted so I backed back out with CMD +Z and used the following steps when converting back to Index mode. First in the Pallete dropdown choose Custon:

Screen Shot 2021-12-13 at 9.55.03 PM.jpg


- In the Indexed Panel options make sure Dither is turned off in the lower portion of the options and in the Palette dropdown choose custom. A color table will pop up as in this next image. Select the Load button and load the Color Table you saved at the beginning of the instructions above.

Screen Shot 2021-12-13 at 9.55.17 PM.jpg

After loading the original Color Palette it should now appear as follows:

Screen Shot 2021-12-13 at 9.55.28 PM.jpg

Click the OK button and you go back to the Index Color Panel options (double check that "Dither is still set to none) and Click the OK button.
This will make the conversion to Indexed Colors yet forcing the Color Table to be the one you started with.

Screen Shot 2021-12-13 at 9.57.52 PM.jpg

You can verify that the Color Mode is Indexed and bring up the Color Table again and verify that the original Color Table is in place.
Screen Shot 2021-12-13 at 9.58.14 PM.jpg

A bit tedious and there might be a more straightfoward way yet I believe this shows a path of how to get it done.
Fingers crossed my explanation was clear enough and gives you the result you are seeking.
John Wheeler
 

Back
Top