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.

readEncodedStrip

Class: Tiff

Read data from specified strip

Syntax

stripData = readEncodedStrip(tiffobj,stripNumber)
[Y,Cb,Cr] = readEncodedStrip(tiffobj,stripNumber)

Description

stripData = readEncodedStrip(tiffobj,stripNumber) reads data from the strip specified by stripNumber. Strip numbers are one-based numbers.

[Y,Cb,Cr] = readEncodedStrip(tiffobj,stripNumber) reads YCbCr component data from the specified strip. The size of the chrominance components Cb and Cr might differ from the size of the luminance component Y depending on the value of the YCbCrSubSampling tag.

readEncodeStrip clips the last strip, if the strip extends past the ImageLength boundary.

Examples

expand all

Read the first strip in the second image of a TIFF file.

Create a Tiff object associated with the example file, example.tif, and make the second image the current directory.

t = Tiff('example.tif','r');
setDirectory(t,2)

Read the data in the first strip. Then, close the Tiff object.

data = readEncodedStrip(t,1);
close(t)

References

This method corresponds to the TIFFReadEncodedStrip function in the LibTIFF C API. To use this method, you must be familiar with the TIFF specification and technical notes. View this documentation at LibTIFF - TIFF Library and Utilities.

Was this topic helpful?