Image Processing Toolbox User's Guide Previous page   Next Page

4. Write the Image to a Disk File

To write the newly adjusted image I2 to a disk file, use the imwrite function. If you include the filename extension '.png', the imwrite function writes the image to a file in Portable Network Graphics (PNG) format, but you can specify other formats.

See the imwrite function reference page for a list of file formats it supports. See also Writing a Graphics Image for a tutorial discussion on writing images using the Image Processing Toolbox.

5. Check the Contents of the Newly Written File

To see what imwrite wrote to the disk file, use the imfinfo function. This function returns information about the image in the file, such as its format, size, width, and height. See Querying a Graphics File for more information about using imfinfo.


Previous page  3. Improve Image Contrast Example 2 -- Advanced Topics Next page

© 1994-2005 The MathWorks, Inc.