Converting Between Graphics File Formats
To change the graphics format of an image, use imread to
import the image into the MATLAB workspace and then use the imwrite function
to export the image, specifying the appropriate file format.
To illustrate, this example uses the imread function
to read an image in TIFF format into the workspace and write the image
data as JPEG format.
moon_tiff = imread('moon.tif');
imwrite(moon_tiff,'moon.jpg');For the specifics of which bit depths are supported for the
different graphics formats, and for how to specify the format type
when writing an image to file, see the reference pages for imread and imwrite.
 | Writing Image Data to a File | | Working with DICOM Files |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit