How can I save a figure to a TIFF image with resolution 300 dpi in MATLAB?

176 views (last 30 days)

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 13 Oct 2016
1. Using the MATLAB Graphical Environment
Select the figure window that shows the figure to be saved and then follow the steps mentioned below:
  • Click on File>>Export Setup.
  • A menu named as “Export Setup: Figure Name” must have popped up.
  • On the left side of the menu, choose the option named “Rendering”. After that, change the value of:
        - ‘Colorspace’ to ’grayscale’
        - ‘Resolution(dpi)’ to 300
This step is shown in image file “Step3.jpeg” attached to the solution.
  • Click on ‘Apply to Figure’ button.
  • Click ‘OK’ button.
  • The menu should have disappeared and you should see the figure window with all your changes applied.
  • Click on File>>Save As.
  • Now, you can save the file to your system. Please do not forget to save as “TIFF image”.
2. Saving a figure to an image file programmatically
  a) Use "print" as: 
 
>> print(gcf, '-dtiff', 'myfigure.tiff');
 
b) Alternatively, you could do: 
 
>> imagewd = getframe(gcf);
>> imwrite(imagewd.cdata, 'myfigure.tiff');
 
To change the quality of a TIFF file, you can specify 'Compression',''none' and increase the resolution with 'Resolution',300.

More Answers (0)

Products


Release

R2014a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!