~ubuntu-branches/ubuntu/dapper/tiff/dapper-updates

« back to all changes in this revision

Viewing changes to man/TIFFReadScanline.3t

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2005-11-09 18:21:15 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20051109182115-v0fd3zcbrq2sq6u4
Tags: 3.7.4-1ubuntu1
* Synchronize to Debian.
* Only change left: xlibmesa-gl-dev -> libgl1-mesa-dev build dependency
  change.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.\" $Header: /cvsroot/osrs/libtiff/man/TIFFReadScanline.3t,v 1.1.1.1 1999/07/27 21:50:27 mike Exp $
2
 
.\"
3
 
.\" Copyright (c) 1988-1997 Sam Leffler
4
 
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
5
 
.\"
6
 
.\" Permission to use, copy, modify, distribute, and sell this software and 
7
 
.\" its documentation for any purpose is hereby granted without fee, provided
8
 
.\" that (i) the above copyright notices and this permission notice appear in
9
 
.\" all copies of the software and related documentation, and (ii) the names of
10
 
.\" Sam Leffler and Silicon Graphics may not be used in any advertising or
11
 
.\" publicity relating to the software without the specific, prior written
12
 
.\" permission of Sam Leffler and Silicon Graphics.
13
 
.\" 
14
 
.\" THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
15
 
.\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
16
 
.\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
17
 
.\" 
18
 
.\" IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
19
 
.\" ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
20
 
.\" OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
21
 
.\" WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
22
 
.\" LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
23
 
.\" OF THIS SOFTWARE.
24
 
.\"
25
 
.if n .po 0
26
 
.TH TIFFReadScanline 3T "October 15, 1995"
27
 
.SH NAME
28
 
TIFFReadScanline \- read and decode a scanline of data from an open
29
 
.SM TIFF
30
 
file
31
 
.SH SYNOPSIS
32
 
.B "#include <tiffio.h>"
33
 
.br
34
 
.B "int TIFFReadScanline(TIFF* tif, tdata_t buf, uint32 row, tsample_t sample)"
35
 
.SH DESCRIPTION
36
 
Read the data for the specified row into the (user supplied)
37
 
data buffer
38
 
.IR buf .
39
 
The data are returned decompressed and, in the native byte-
40
 
and bit-ordering, but are otherwise packed (see further below).
41
 
The buffer must be large enough to hold an entire scanline of data.
42
 
Applications should call the routine
43
 
.IR TIFFScanlineSize
44
 
to find out the size (in bytes) of a scanline buffer.
45
 
The
46
 
.I row
47
 
parameter is always used by
48
 
.IR TIFFReadScanline ;
49
 
the
50
 
.I sample
51
 
parameter is used only if data are organized in separate planes (\c
52
 
.IR PlanarConfiguration =2).
53
 
.SH NOTES
54
 
The library attempts to hide bit- and byte-ordering differences
55
 
between the image and the native machine by converting data
56
 
to the native machine order.
57
 
Bit reversal is done if the
58
 
.I FillOrder
59
 
tag is opposite to the native machine bit order.
60
 
16- and 32-bit samples are automatically byte-swapped if the
61
 
file was written with a byte order opposite to the native
62
 
machine byte order,
63
 
.PP
64
 
In C++ the
65
 
.I sample
66
 
parameter defaults to 0.
67
 
.SH "RETURN VALUES"
68
 
.IR TIFFReadScanline
69
 
returns \-1 if it detects an error; otherwise 1 is returned.
70
 
.SH DIAGNOSTICS
71
 
All error messages are directed to the
72
 
.IR TIFFError (3T)
73
 
routine.
74
 
.PP
75
 
.BR "Compression algorithm does not support random access" .
76
 
Data was requested in a non-sequential order from a file that
77
 
uses a compression algorithm and that has
78
 
.I RowsPerStrip
79
 
greater than one.
80
 
That is, data in the image is stored in a compressed form,
81
 
and with multiple rows packed into a strip.
82
 
In this case, the library does not support random access to the data.
83
 
The data should either be accessed sequentially, or the file
84
 
should be converted so that each strip is made up of one row
85
 
of data.
86
 
.SH BUGS
87
 
Reading subsampled YCbCR data does not work correctly
88
 
because, for 
89
 
.IR PlanarConfiguration =2
90
 
the size of a scanline is not calculated on a per-sample basis,
91
 
and for
92
 
.IR PlanarConfiguration =1
93
 
the library does not unpack the block-interleaved samples; use
94
 
the strip- and tile-based interfaces to read these formats.
95
 
.SH "SEE ALSO"
96
 
.IR libtiff (3T),
97
 
.IR TIFFOpen (3T),
98
 
.IR TIFFReadEncodedStrip (3T),
99
 
.IR TIFFReadRawStrip (3T)