Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating colour table - locked colours and selective

Status
Not open for further replies.

samcraze

Programmer
Dec 7, 2001
4
GB
I have 200 images I am preparing for palm. I need to apply a 256 colour palette to them which has 16 fixed colours and lets the remaining 240 be adaptive to each image. I want to create this palette so I can use a batch process.

I've had a look around the web and can't find anything about this - is it possible and how can I do it???

thanks
Sam
 
I don't have Photoshop to hand right now, but I guess this might come close. It takes a little effort to set it up, but once you have the action created, you can batch-process the rest of your images.

1: Make a new file 16 pixels x 1 pixel, and color each pixel one of the 16 fixed colors. Save this file as an EPS with binary or ASCII encoding for later. Make a note of where it's saved and close the file.

2: Open a sample image and start recording a new action.

3: Convert the color mode to Indexed Color, choose Adaptive and set the number of colors to 240.

4: Convert the color mode back to RGB.

5: Increase the canvas size height by one pixel (Image > Canvas Size), making sure that you select one of the bottom vertical anchor points.

6: Go to File > Place..., find the 16 color image you saved previously and press 'return' (it should appear on a new layer).

7: Select All, then choose Layer > Align to Selection > Top. Deselect & Flatten the image.

8: Convert the color mode to Indexed color, this time choosing Exact. The number of colors will be somewhere between 240 and 256.

9: Go back to Image > Canvas Size... and decrease the height by one pixel, again anchoring to the bottom of the image. Stop recording at this point.

That should give you an image with 16 colors guaranteed to be the same. Like I said, I don't have Photoshop in front of me right now, so apologies for any inaccuracies. Let us know how you get on!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top