Hi
I am working with satellite images (an 8-bit grayscale TIFF file), and I am trying to apply it a color palette using IM. The problem is that I need to set a color different ranges of values, for example red for value between 35-65 and blue between 70-75.
I would like some help about this.
Thanks
_____________________________
http://www.realvirtual.com.mx
How to apply color palette to a grayscale image
How to apply color palette to a grayscale image
Last edited by RDalmagro on 2014-04-03T06:14:39-07:00, edited 1 time in total.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: How to apply color palette to a grayscale image
One way of doing this is to make a CLUT (colour look-up table), which can then be used for many source images. Windows BAT syntax:
Then each image can be processed:
Code: Select all
convert ^
-size 1x256 gradient: -rotate 90 ^
-fx "u>=35/255&&u<=65/255?red:u" ^
-fx "u>=70/255&&u<=75/255?blue:u" ^
clutfile.png
Code: Select all
convert in.tiff clutfile.png -clut out.tiff
snibgo's IM pages: im.snibgo.com