GenericMappingTools / GenericMappingTools/gmt

grdview has troubles with images not inRGB

Open
#6,908 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C
Stars
979
Forks
414
Avg merge
17h 26m
Merged PRs (30d)
54

Description

The Image **I** has an internal colormap but I need to convert it to RGB so that ``grdview`` is happy with it.
```
julia> imshow(z, drape=ind2rgb(I), p=(135,30), name="ok.png")

julia> imshow(z, drape=I, p=(135,30), name="bad1.png")

# This removes the colormap from I before sending it to grdview
julia> imshow(z, drape=image_cpt!(I,clear=true), p=(135,30), name="bad2.png")

# And this shows that grdimage is happy to plot an image without a colormap.
imshow(I, name="ok2.png")
```
![ok](https://user-images.githubusercontent.com/537321/180463393-d755e5eb-4131-4029-b09a-a568feebcb96.png)

![bad1](https://user-images.githubusercontent.com/537321/180463428-ab1bfb55-1f45-44ac-b068-cfcaf4cf81ff.png)

![bad2](https://user-images.githubusercontent.com/537321/180463460-02754a45-be6e-4824-984e-0d6919d909e5.png)

![ok2](https://user-images.githubusercontent.com/537321/180463484-0c714981-674b-49e8-96a3-8025a8594299.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.