0

I have an image where pixel values are integers, they go from 0 to 6 and I also have some 999. I want the value 999 to be transparent, which I could achieve by myself. I would like values 0 to 6 to be different colors. I have no idea how to do this.

Can anyone help me?

1 Answer 1

1

Open layer properties, in "Style" tab choose "Colormap" in "Color map" drop-down menu. Then go to "Colormap" tab and set up colours.

4
  • Cool! I did it Thank you... Is there anyway to automatize this? so as to not select a color one by one... python maybe?
    – JEquihua
    Commented Sep 20, 2012 at 20:00
  • @JEquihua, if you have to apply the same Colormap to the set of rasters, save the style you've created for the first one ("Save style..." in layer properties) as .qml-file and use "Load style" for others. Also there is MultyQml plugin that will apply chosen .qml to the set of rasters. Commented Sep 20, 2012 at 20:11
  • I'm not really applying the same colormap to a set of rasters, I did an unspervised classification to about 150 images, each one could have a different amount of classes. So... Maybe this would not work so well.. any thoughts?
    – JEquihua
    Commented Sep 20, 2012 at 20:45
  • @JEquihua, make a colormap that will cover the maximum number of classes you may get and apply it to all of the images. There is nothing wrong if some of the values from colormap won't be used in particular raster. Commented Sep 20, 2012 at 21:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.