Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

readRGBAImage

Class: Tiff

Read image using RGBA interface

Syntax

[RGB,alpha] = readRGBAImage()

Description

[RGB,alpha] = readRGBAImage() reads an entire image using the RGBA interface. RGB consists of an m-by-n-by-3 colormetric image, where m and n are the height and width of the tile, respectively. alpha is the associated alpha matting. If the image does not have associated alpha matting, then alpha is a matrix with all values set to 255 (transparent).

The pixel values may be transformed depending upon the values of the following tags:

PhotometricInterpretation
BitsPerSample
SamplesPerPixel
Orientation
ExtraSamples
ColorMap

Examples

Return all image data as RGB, with associated alpha matting.

t = Tiff('example.tif','r');
t.setDirectory(2); 
[RGB,A] = t.readRGBAImage();
t.close();

References

This method corresponds to the TIFFReadRGBAImage function in the LibTIFF C API.

To use this method, you must be familiar with LibTIFF version 4.0.0, as well as the TIFF specification and technical notes. View this documentation at LibTIFF - TIFF Library and Utilities.

Was this topic helpful?