1<!-- Creator : groff version 1.19.2 --> 2<!-- CreationDate: Mon Jan 2 17:41:53 2006 --> 3<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 4"http://www.w3.org/TR/html4/loose.dtd"> 5<html> 6<head> 7<meta name="generator" content="groff -Thtml, see www.gnu.org"> 8<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> 9<meta name="Content-Style" content="text/css"> 10<style type="text/css"> 11 p { margin-top: 0; margin-bottom: 0; } 12 pre { margin-top: 0; margin-bottom: 0; } 13 table { margin-top: 0; margin-bottom: 0; } 14</style> 15<title>RAW2TIFF</title> 16 17</head> 18<body> 19 20<h1 align=center>RAW2TIFF</h1> 21 22<a href="#NAME">NAME</a><br> 23<a href="#SYNOPSIS">SYNOPSIS</a><br> 24<a href="#DESCRIPTION">DESCRIPTION</a><br> 25<a href="#OPTIONS">OPTIONS</a><br> 26<a href="#GUESSING THE IMAGE GEOMETRY">GUESSING THE IMAGE GEOMETRY</a><br> 27<a href="#SEE ALSO">SEE ALSO</a><br> 28 29<hr> 30 31 32<a name="NAME"></a> 33<h2>NAME</h2> 34 35 36<p style="margin-left:11%; margin-top: 1em">raw2tiff 37− create a <small>TIFF</small> file from a raw 38data</p> 39 40<a name="SYNOPSIS"></a> 41<h2>SYNOPSIS</h2> 42 43 44 45<p style="margin-left:11%; margin-top: 1em"><b>raw2tiff</b> 46[ <i>options</i> ] <i>input.raw output.tif</i></p> 47 48<a name="DESCRIPTION"></a> 49<h2>DESCRIPTION</h2> 50 51 52 53<p style="margin-left:11%; margin-top: 1em"><i>raw2tiff</i> 54converts a raw byte sequence into <small>TIFF.</small> By 55default, the <small>TIFF</small> image is created with data 56samples packed (<i>PlanarConfiguration</i>=1), compressed 57with the PackBits algorithm 58(<i>Compression</i>=<i>32773),</i> and with each strip no 59more than 8 kilobytes. These characteristics can overridden, 60or explicitly specified with the options described 61below.</p> 62 63<a name="OPTIONS"></a> 64<h2>OPTIONS</h2> 65 66 67<p style="margin-left:11%; margin-top: 1em"><b>−H 68<number></b></p> 69 70<p style="margin-left:22%;">size of input image file header 71in bytes (0 by default). This amount of data just will be 72skipped from the start of file while reading.</p> 73 74<p style="margin-left:11%;"><b>−w 75<number></b></p> 76 77<p style="margin-left:22%;">width of input image in pixels 78(can be guessed, see <b><small>GUESSING THE IMAGE 79GEOMETRY</small></b> below).</p> 80 81<p style="margin-left:11%;"><b>−l 82<number></b></p> 83 84<p style="margin-left:22%;">length of input image in 85lines(can be guessed, see <b><small>GUESSING THE IMAGE 86GEOMETRY</small></b> below).</p> 87 88<p style="margin-left:11%;"><b>−b 89<number></b></p> 90 91<p style="margin-left:22%;">number of bands in input image 92(1 by default).</p> 93 94<p style="margin-left:11%;"><b>−d data_type</b></p> 95 96<p style="margin-left:22%;">type of samples in input image, 97where <b>data_type</b> may be:</p> 98 99<table width="100%" border=0 rules="none" frame="void" 100 cellspacing="0" cellpadding="0"> 101<tr valign="top" align="left"> 102<td width="22%"></td> 103<td width="-14%"></td> 104<td width="7%"></td> 105<td width="8%"> 106 107 108<p valign="top"><i>byte</i></p></td> 109<td width="77%"> 110</td> 111<tr valign="top" align="left"> 112<td width="22%"></td> 113<td width="-14%"></td> 114<td width="7%"></td> 115<td width="8%"></td> 116<td width="77%"> 117 118 119<p valign="top">8-bit unsigned integer (default),</p></td> 120<tr valign="top" align="left"> 121<td width="22%"></td> 122<td width="-14%"></td> 123<td width="7%"></td> 124<td width="8%"> 125 126 127<p valign="top"><i>short</i></p></td> 128<td width="77%"> 129 130 131<p valign="top">16-bit unsigned integer,</p></td> 132<tr valign="top" align="left"> 133<td width="22%"></td> 134<td width="-14%"></td> 135<td width="7%"></td> 136<td width="8%"> 137 138 139<p valign="top"><i>long</i></p></td> 140<td width="77%"> 141</td> 142<tr valign="top" align="left"> 143<td width="22%"></td> 144<td width="-14%"></td> 145<td width="7%"></td> 146<td width="8%"></td> 147<td width="77%"> 148 149 150<p valign="top">32-bit unsigned integer,</p></td> 151<tr valign="top" align="left"> 152<td width="22%"></td> 153<td width="-14%"></td> 154<td width="7%"></td> 155<td width="8%"> 156 157 158<p valign="top"><i>sbyte</i></p></td> 159<td width="77%"> 160 161 162<p valign="top">8-bit signed integer,</p></td> 163<tr valign="top" align="left"> 164<td width="22%"></td> 165<td width="-14%"></td> 166<td width="7%"></td> 167<td width="8%"> 168 169 170<p valign="top"><i>sshort</i></p></td> 171<td width="77%"> 172 173 174<p valign="top">16-bit signed integer,</p></td> 175<tr valign="top" align="left"> 176<td width="22%"></td> 177<td width="-14%"></td> 178<td width="7%"></td> 179<td width="8%"> 180 181 182<p valign="top"><i>slong</i></p></td> 183<td width="77%"> 184 185 186<p valign="top">32-bit signed integer,</p></td> 187<tr valign="top" align="left"> 188<td width="22%"></td> 189<td width="-14%"></td> 190<td width="7%"></td> 191<td width="8%"> 192 193 194<p valign="top"><i>float</i></p></td> 195<td width="77%"> 196 197 198<p valign="top">32-bit IEEE floating point,</p></td> 199<tr valign="top" align="left"> 200<td width="22%"></td> 201<td width="-14%"></td> 202<td width="7%"></td> 203<td width="8%"> 204 205 206<p valign="top"><i>double</i></p></td> 207<td width="77%"> 208 209 210<p valign="top">64-bit IEEE floating point,</p></td> 211</table> 212 213<p style="margin-left:11%;"><b>−i config</b></p> 214 215<p style="margin-left:22%;">type of samples interleaving in 216input image, where <b>config</b> may be:</p> 217 218<table width="100%" border=0 rules="none" frame="void" 219 cellspacing="0" cellpadding="0"> 220<tr valign="top" align="left"> 221<td width="22%"></td> 222<td width="-14%"></td> 223<td width="7%"></td> 224<td width="8%"> 225 226 227<p valign="top"><i>pixel</i></p></td> 228<td width="77%"> 229 230 231<p valign="top">pixel interleaved data (default),</p></td> 232<tr valign="top" align="left"> 233<td width="22%"></td> 234<td width="-14%"></td> 235<td width="7%"></td> 236<td width="8%"> 237 238 239<p valign="top"><i>band</i></p></td> 240<td width="77%"> 241</td> 242<tr valign="top" align="left"> 243<td width="22%"></td> 244<td width="-14%"></td> 245<td width="7%"></td> 246<td width="8%"></td> 247<td width="77%"> 248 249 250<p valign="top">band interleaved data.</p></td> 251</table> 252 253<p style="margin-left:11%;"><b>−p photo</b></p> 254 255<p style="margin-left:22%;">photometric interpretation 256(color space) of the input image, where <b>photo</b> may be: 257<i><br> 258miniswhite</i> white color represented with 0 value, <i><br> 259minisblack</i> black color represented with 0 value 260(default),</p> 261 262<table width="100%" border=0 rules="none" frame="void" 263 cellspacing="0" cellpadding="0"> 264<tr valign="top" align="left"> 265<td width="22%"></td> 266<td width="-14%"></td> 267<td width="7%"></td> 268<td width="8%"> 269 270 271<p valign="top"><i>rgb</i></p></td> 272<td width="8%"> 273</td> 274<td width="69%"> 275 276 277<p valign="top">image has RGB color model,</p></td> 278<tr valign="top" align="left"> 279<td width="22%"></td> 280<td width="-14%"></td> 281<td width="7%"></td> 282<td width="8%"> 283 284 285<p valign="top"><i>cmyk</i></p></td> 286<td width="8%"> 287</td> 288<td width="69%"> 289 290 291<p valign="top">image has CMYK (separated) color model,</p></td> 292<tr valign="top" align="left"> 293<td width="22%"></td> 294<td width="-14%"></td> 295<td width="7%"></td> 296<td width="8%"> 297 298 299<p valign="top"><i>ycbcr</i></p></td> 300<td width="8%"></td> 301<td width="69%"> 302</td> 303<tr valign="top" align="left"> 304<td width="22%"></td> 305<td width="-14%"></td> 306<td width="7%"></td> 307<td width="8%"></td> 308<td width="8%"></td> 309<td width="69%"> 310 311 312<p valign="top">image has YCbCr color model,</p></td> 313<tr valign="top" align="left"> 314<td width="22%"></td> 315<td width="-14%"></td> 316<td width="7%"></td> 317<td width="8%"> 318 319 320<p valign="top"><i>cielab</i></p></td> 321<td width="8%"></td> 322<td width="69%"> 323 324 325<p valign="top">image has CIE L*a*b color model,</p></td> 326<tr valign="top" align="left"> 327<td width="22%"></td> 328<td width="-14%"></td> 329<td width="7%"></td> 330<td width="8%"> 331 332 333<p valign="top"><i>icclab</i></p></td> 334<td width="8%"></td> 335<td width="69%"> 336 337 338<p valign="top">image has ICC L*a*b color model,</p></td> 339<tr valign="top" align="left"> 340<td width="22%"></td> 341<td width="-14%"></td> 342<td width="7%"></td> 343<td width="8%"> 344 345 346<p valign="top"><i>itulab</i></p></td> 347<td width="8%"></td> 348<td width="69%"> 349 350 351<p valign="top">image has ITU L*a*b color model,</p></td> 352</table> 353 354<table width="100%" border=0 rules="none" frame="void" 355 cellspacing="0" cellpadding="0"> 356<tr valign="top" align="left"> 357<td width="11%"></td> 358<td width="3%"> 359 360 361 362<p style="margin-top: 1em" valign="top"><b>−s</b></p> </td> 363<td width="8%"></td> 364<td width="78%"> 365 366 367<p style="margin-top: 1em" valign="top">swap bytes fetched 368from the input file.</p></td> 369<tr valign="top" align="left"> 370<td width="11%"></td> 371<td width="3%"> 372 373 374 375<p style="margin-top: 1em" valign="top"><b>−L</b></p> </td> 376<td width="8%"></td> 377<td width="78%"> 378 379 380<p style="margin-top: 1em" valign="top">input data has 381LSB2MSB bit order (default).</p></td> 382<tr valign="top" align="left"> 383<td width="11%"></td> 384<td width="3%"> 385 386 387 388<p style="margin-top: 1em" valign="top"><b>−M</b></p> </td> 389<td width="8%"></td> 390<td width="78%"> 391 392 393<p style="margin-top: 1em" valign="top">input data has 394MSB2LSB bit order.</p></td> 395<tr valign="top" align="left"> 396<td width="11%"></td> 397<td width="3%"> 398 399 400 401<p style="margin-top: 1em" valign="top"><b>−c</b></p> </td> 402<td width="8%"></td> 403<td width="78%"> 404 405 406<p style="margin-top: 1em" valign="top">Specify a 407compression scheme to use when writing image data: 408<b>−c none</b> for no compression, <b>-c packbits</b> 409for the PackBits compression algorithm (the default), <b>-c 410jpeg</b> for the baseline JPEG compression algorithm, <b>-c 411zip</b> for the Deflate compression algorithm, and 412<b>−c lzw</b> for Lempel-Ziv & Welch.</p></td> 413</table> 414 415<p style="margin-left:11%;"><b>−r 416<number></b></p> 417 418<p style="margin-left:22%;">Write data with a specified 419number of rows per strip; by default the number of 420rows/strip is selected so that each strip is approximately 8 421kilobytes.</p> 422 423<a name="GUESSING THE IMAGE GEOMETRY"></a> 424<h2>GUESSING THE IMAGE GEOMETRY</h2> 425 426 427 428<p style="margin-left:11%; margin-top: 1em"><i>raw2tiff</i> 429can guess image width and height in case one or both of 430these parameters are not specified. If you omit one of those 431parameters, the complementary one will be calculated based 432on the file size (taking into account header size, number of 433bands and data type). If you omit both parameters, the 434statistical approach will be used. Utility will compute 435correlation coefficient between two lines at the image 436center using several appropriate line sizes and the highest 437absolute value of the coefficient will indicate the right 438line size. That is why you should be cautious with the very 439large images, because guessing process may take a while 440(depending on your system performance). Of course, the 441utility can’t guess the header size, number of bands 442and data type, so it should be specified manually. If you 443don’t know anything about your image, just try with 444the several combinations of those options.</p> 445 446<p style="margin-left:11%; margin-top: 1em">There is no 447magic, it is just a mathematical statistics, so it can be 448wrong in some cases. But for most ordinary images guessing 449method will work fine.</p> 450 451<a name="SEE ALSO"></a> 452<h2>SEE ALSO</h2> 453 454 455 456<p style="margin-left:11%; margin-top: 1em"><b>pal2rgb</b>(1), 457<b>tiffcp</b>(1), <b>tiffmedian</b>(1), 458<b>libtiff</b>(3)</p> 459 460<p style="margin-left:11%; margin-top: 1em">Libtiff library 461home page: <b>http://www.remotesensing.org/libtiff/</b></p> 462<hr> 463</body> 464</html> 465