Select to view content in your preferred language

How to select one color from a colormap image to make it transparent

664
4
Jump to solution
01-16-2024 02:27 AM
FrankThiemann
Emerging Contributor

I have a topographic map stored as tif-image with indexed colors (colormap).

I want to select one of the colors of the image as transparent background color. 

To edit the colormap in this manner seems not to be possible.

Is there any workaround to do this without changing the image format (e.g without converting the image into RGB)?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
FrankThiemann
Emerging Contributor

I found a solution.

I can set the nodata value of the image using arccatalog.

FrankThiemann_0-1706208571192.png

 

View solution in original post

4 Replies
SeaRM
by
Regular Contributor

If your colormap is a .clr file, you can edit it as a simple text file in different ways. Just replace your selected color with the required one.

0 Kudos
ThomasHoman
Frequent Contributor
0 Kudos
FrankThiemann
Emerging Contributor

Thanks for you try. Both is not what I'm looking for.

Yes, normally you can select one color value as background color - but this does not work with colormap images. There is simply no menu to select this color.

FrankThiemann_1-1706204974270.png

 

I can export the colormap change the colors and reimport the colormap. But these are only rgb values. I can not change the transparency (alpha)

FrankThiemann_0-1706204938614.png

exported colormap looks like this (no. r g b)

0 242 242 242
1 255 254 255
2 255 255 255
3 191 230 230
4 153 255 179
5 230 255 204
6 191 242 128
7 230 230 204
8 255 255 230
...

FrankThiemann
Emerging Contributor

I found a solution.

I can set the nodata value of the image using arccatalog.

FrankThiemann_0-1706208571192.png