Products & Services Solutions Academia Support User Community Company

Learn more about Image Processing Toolbox   

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.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS