gmt icon indicating copy to clipboard operation
gmt copied to clipboard

grdview has troubles with images not inRGB

Open joa-quim opened this issue 3 years ago • 0 comments

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

bad1

bad2

ok2

joa-quim avatar Jul 22 '22 14:07 joa-quim