Converting Map Figure into TIFF file without background
Show older comments
Hello Community!
So I have a 300 by 500 by 1 data set that corresponds to a scalar colormap plot. In the figure, I hid all of the titles, axes, etc., so that the figure only shows the colormap. I would like to save this plot such that the image retains its 300 by 500 pixel dimensions, and it is lossless.
However, when saving as a TIFF file, MATLAB adds a white background, making the image larger in size.
I tried using imwrite (which allows me to save images without the background), however I am unable to save as a TIFF because my data type is incompatible. Upon converting to a double type data, the resulting TIFF image showed a binary map. I have tried other file types, but they are too lossy (I can only choose bitdepth of 8, when 16 or higher would be preferred).
Any suggestions or advice would be greatly appreciated!
2 Comments
Walter Roberson
on 1 Nov 2017
What is the data type of your data, and the range?
Edmund Han
on 1 Nov 2017
Accepted Answer
More Answers (0)
Categories
Find more on Images in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!