Graphics    

Reading a Graphics Image

The function imread reads an image from any supported graphics image file in any of the supported bit depths. Most of the images that you will read are 8-bit. When these are read into memory, MATLAB stores them as class uint8. The main exception to this rule is that MATLAB supports 16-bit data for PNG and TIFF images. If you read a 16-bit PNG or TIFF image, it will be stored as class uint16.

For our discussion here we will show one of the most basic syntax uses of imread. This code reads the image ngc6543a.jpg.

You can write (save) image data using the imwrite function. The statements

create a BMP file containing the clown image.


  Reading, Writing, and Querying Graphics Image Files Writing a Graphics Image