Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Color image file using "imwrite" function
Posted:
Jan 25, 2010 1:14 PM


I tried the following
m = spiral(100); m = m  min(m(:)); m = m / max(m(:)); m = m*64; imwrite(m,jet,'spiral.png');
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, SangHo



