RAW2TIFF(1)
π RAW2TIFF(1) π
okay bestie, gather round, because we're talking about raw2tiff β the LibTIFF girlie whose whole personality is "I take your raw bytes and I make you a TIFF." π
β¨ NAME β¨
raw2tiff β create a TIFF file from a raw data file π
πΈ SYNOPSIS πΈ
raw2tiff [ options ] *input.raw output.tif
π¦ DESCRIPTION π¦
So raw2tiff converts a raw byte sequence into TIFF. That's the whole vibe. No cap. π
By default, the TIFF image gets created with data samples packed (PlanarConfiguration=1), compressed with the PackBits algorithm (Compression=32773), and with each strip no more than 8 kilobytes. Those are the factory settings, the default outfit, the "I woke up like this."
But you can override all of that, or explicitly specify it, with the options described below. main character energy only β¨
π OPTIONS π
-Hnumber β Size of the input image file header in bytes (0by default). This amount of data just gets skipped from the start of the file while reading. Like, we're not even looking at it. bye. π-wnumber β Width of the input image in pixels. It can be guessed, see Guessing the image geometry below π-bnumber β number of bands in the input image (1by default). (the manpage literally writes this one as "option-b number", iconic formatting, we keep it π)-ddatatype β type of samples in the input image, where datatype may be one of:byteβ 8-bit unsigned integer (default)shortβ 16-bit unsigned integerlongβ 32-bit unsigned integersbyteβ 8-bit signed integersshortβ 16-bit signed integerslongβ 32-bit signed integerfloatβ 32-bit IEEE floating pointdoubleβ 64-bit IEEE floating point
nine whole options, she ate π₯
-iconfig β type of sample interleaving in the input image, where config may be one of:pixelβ pixel interleaved data (default)bandβ band interleaved data.
-pphoto β photometric interpretation (color space) of the input image, where photo may be one of:miniswhiteβ white color represented with 0 valueminisblackβ black color represented with 0 value (default)rgbβ image has RGB color modelcmykβ image has CMYK (separated) color modelycbcrβ image has YCbCr color modelcielabβ image has CIE L*a*b color modelicclabβ image has ICC L*a*b color modelitulabβ image has ITU L*a*b color model
a whole rainbow of color models, we love to see it π
-sβ swap bytes fetched from the input file. π-Lβ input data has LSB2MSB bit order (default). β¨-Mβ input data has MSB2LSB bit order. β¨-cβ Specify a compression scheme to use when writing image data:-c nonefor no compression,-c packbitsfor the PackBits compression algorithm (the default),-c jpegfor the baseline JPEG compression algorithm,-c zipfor the Deflate compression algorithm,-c lzwfor Lempel-Ziv & Welch. pick your fighter π
π§ GUESSING THE IMAGE GEOMETRY π§
raw2tif can guess image width and height in case one or both of these parameters are not specified. bestie really said "I'll figure it out myself" π
If you omit one of those parameters, the complementary one will be calculated based on the file size (taking into account header size, number of bands and data type). If you omit both parameters, the statistical approach will be used. Utility will compute correlation coefficient between two lines at the image center using several appropriate line sizes, and the highest absolute value of the coefficient will indicate the right line size. math girlie behavior fr fr π
That is why you should be cautious with the very large images, because the guessing process may take a while (depending on your system performance). β³
Of course, the utility can't guess the header size, number of bands and data type, so it should be specified manually. If you don't know anything about your image, just try with the several combinations of those options. trial and error is a lifestyle π
There is no magic, it is just a mathematical statistics, so it can be wrong in some cases. But for most ordinary images the guessing method will work fine. β¨
ngl, it's giving "trust the process" but the process is literally just statistics, so keep that in mind.
π SEE ALSO π
pal2rgb (1), tiffinfo (1), tiffcp (1), tiffmedian (1), libtiff (3tiff)
π«Ά AUTHOR π«Ά
LibTIFF contributors
β COPYRIGHT β
1988-2025, LibTIFF contributors
and that's the whole page, bestie π this one's from LibTIFF version 4.7, dated Jun 27, 2026 β go convert some raw bytes, you got this π
π¦ where this page comes from
- fedora 43: libtiff-tools 4.7.2-1.fc43
- fedora 43: libtiff-tools 4.7.2-3.fc43 Β· libtiff
- fedora 44: libtiff-tools 4.7.2-1.fc44
- fedora 44: libtiff-tools 4.7.2-3.fc44 Β· libtiff
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms