[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
saving a colour image of what imagesc displays
From: |
lynx . abraxas |
Subject: |
saving a colour image of what imagesc displays |
Date: |
Mon, 10 Dec 2012 18:57:43 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hello!
Is it possible to save a colour image of what imagesc displays, i.e. a matrix
whos entries are mapped to the current color‐map? I don't want a "screen shot"
of the window that pops up when using imagesc (i.e. using print).
I used to use saveimage for this but this no longer works. I tried:
imwrite(mHist2d, "test.png", "png");
which saves the matrix as an image but only in greyscale. I also tried:
imwrite(ind2rgb(gray2ind(mHist2d)), "test.png", "png");
which saves a colour image but it only uses a constant colour for each pixel
even if there are different values in mHist2d.
This does not work:
imwrite(mHist2d, colormap(cmap), "test.png", "png");
warning: your version of GraphicsMagick limits images to 8 bits per pixel
error: ind2rgb: X must be an indexed image
error: called from:
error: /usr/share/octave/3.6.2/m/image/ind2rgb.m at line 44, column 5
error: /usr/share/octave/3.6.2/m/image/imwrite.m at line 176, column 16
error: plot_hists at line 277, column 3
error: /home/me/octave/scripts/ori_05.m at line 342, column 5
Thanks for any hints or help.
Lynx
- saving a colour image of what imagesc displays,
lynx . abraxas <=