Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
pmi432 / LR07 / 2read / image processing toolbox guide.pdf
Скачиваний:
166
Добавлен:
18.03.2015
Размер:
18.08 Mб
Скачать

3 Reading and Writing Image Data

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.

3-8

Соседние файлы в папке 2read