Can I save an image with different colormap? (Readable by Matlab)
Show older comments
I used the command "imread" to get a matrix A of the image and its colormap.
I inverted the colormap with:
Icmap=colormap(flipud(cmap));
I want to apply the inverted map to an image B and save the result.
Is there a way to save the image B taking into account the new colormap, such that it's readable by the command "imread"?
If I use the command "imwrite":
imwrite(B,Icmap,"image_name.png")
I get an image in my folder which represents what I want (if I open it OUTSIDE Matlab), but the command "imread" gives me the original image B as a matrix.
Thank you, in any case
Accepted Answer
More Answers (0)
Categories
Find more on Images in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
