readRGBAStrip

Class: Tiff

Read strip data using RGBA interface

Syntax

[RGB,alpha] = readRGBAStrip(row)

Description

[RGB,alpha] = readRGBAStrip(row) reads a strip using the RGBA interface. row is a one-based number of any row contained by the strip. RGB consists of an m-by-n-by-3 colormetric image, where m and n are the height and width of the strip, 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 strip is clipped if the strip boundary extends past the end of the image.

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

PhotometricInterpretation
BitsPerSample
SamplesPerPixel
Orientation
ExtraSamples
ColorMap

Examples

Open a Tiff object and read the strip of data that contains the first row, using the RGBA interface, from the example file, example.tif

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

References

This method corresponds to the TIFFReadRGBAStrip 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?