Quantcast

Documentation Center

  • Trial Software
  • Product Updates

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.

See Also

| |

Tutorials

Was this topic helpful?