The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Color image file using "imwrite" function
Replies: 3   Last Post: Jan 25, 2010 9:34 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Sang-Ho Yun

Posts: 7
Registered: 5/27/09
Color image file using "imwrite" function
Posted: Jan 25, 2010 1:14 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I tried the following

m = spiral(100);
m = m - min(m(:));
m = m / max(m(:));
m = m*64;

The number 64 is the 1st dimension of the colormap "jet".
It looks like without making the range of m be [1 64] (or [0 63]?), the
spiral.png does not show the nice distribution of color range of "jet".
Am I getting this right?

Are there other ways to make color image files with imwrite?
My ultimate goal is to make a 50% transparent png color image files.

Thank you,

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.