Programming Previous page   Next Page

Exporting Graphics Data

To export data from the MATLAB workspace using one of the standard graphics file formats, use the imwrite function. Using this function, you can export data in formats such as the Tagged Image File Format (TIFF), Joint Photographic Experts Group (JPEG), and Portable Network Graphics (PNG). For a complete list of supported formats, see the imwrite reference page.

The following example writes a multidimensional array of uint8 data I from the MATLAB workspace into a file in TIFF format. The class of the output image written to the file depends on the format specified. For most formats, if the input array is of class uint8, imwrite outputs the data as 8-bit values. See the imwrite reference page for details.


Previous page  Importing Graphics Data Working with Audio and Video Data Next page

© 1994-2005 The MathWorks, Inc.