导航菜单
首页 >  images/img_other.png  > Image file type and format guide

Image file type and format guide

TIFF is a raster graphics file format which was created to store scanned photos, although it can be any kind of image. It is a somewhat "heavy" format, in that TIFF files have a tendency to be larger than images in other formats. This is because of the metadata often included, as well as the fact that most TIFF images are either uncompressed or use compression algorithms that still leave fairly large files after compression.

TIFF supports a variety of compression methods, but the most commonly used are the CCITT Group 4 (and, for older fax systems, Group 3) compression systems used for by fax software, as well as LZW and lossy JPEG compression.

Every value in a TIFF file is specified using its tag (indicating what kind of information it is, such as the width of the image) and its type (indicating the format the data is stored in), followed by the length of the array of values to assign to that tag (all properties are stored in arrays, even for single values). This allows different data types to be used for the same properties. For example, the width of an image, ImageWidth, is stored using tag 0x0100, and is a one-entry array. By specifying type 3 (SHORT), the value of ImageWidth is stored as a 16-bit value:

Tag Type Size Value 0x0100 (ImageWidth) 0x0003 (SHORT) 0x00000001 (1 entry) 0x0280 (640 pixels)

Specifying type 4 (LONG) stores the width as a 32-bit value:

Tag Type Size Value 0x0100 (ImageWidth) 0x0004 (LONG) 0x00000001 (1 entry) 0x00000280 (640 pixels)

A single TIFF file can contain multiple images; this may be used to represent multi-page documents, for example (such as a multi-page scanned document, or a received fax). However, software reading TIFF files is only required to support the first image.

TIFF supports a variety of color spaces, not just RGB. These include CMYK, YCbCr, and others, making TIFF a good choice for storing images intended for print, film, or television media.

Other than Safari, browsers do not natively support TIFF images in web content except by using special libraries or browser add-ons. As such, TIFF files are not broadly used for displaying web content, but it's common to provide downloadable TIFF files when distributing photos and other artwork intended for precision editing or printing.

MIME type image/tiff File extension(s) .tif, .tiff Specification https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#50577413_pgfId-1035272 Browser compatibility Safari Maximum dimensions 4,294,967,295×4,294,967,295 pixels (theoretical) Supported color modes Color mode Bits per component (D) Description Bilevel 1 A bilevel TIFF stores 8 bits in each byte, one bit per pixel.The PhotometricInterpretation field specifies which of 0 and 1 are black and which is white.Greyscale 4 and 8 Each pixel consists of a single D-bit value indicating the brightness of the greyscale pixel. True color 8 All true color RGB images are stored using 8-bits each of red, green, and blue. Indexed color 4 and 8 Each pixel is an index into a ColorMap record, which defines the colors used in the image.The color map lists all of the red values, then all of the green values, then all of the blue values (rather than rgb, rgb, rgb…).Greyscale with alpha 4 and 8 Alpha information is added by specifying that there are more than 3 samples per pixel in the SamplesPerPixel field, and indicating the type of alpha (1 for an associated, pre-multiplied alpha component, and 2 for unassociated alpha - a separate matte); however, alpha channels are rarely used in TIFF files and may be unsupported by the user's software. True color with alpha 8 Alpha information is added by specifying that there are more than 3 samples per pixel in the SamplesPerPixel field, and indicating the type of alpha (1 for an associated, pre-multiplied alpha component, and 2 for unassociated alpha - a separate matte); however, alpha channels are rarely used in TIFF files and may be unsupported by the user's software. Compression Most TIFF files are uncompressed, but lossless PackBits and LZW compression are supported, as is lossy JPEG compression. Licensing No license required (aside from any associated with libraries you might use); all known patents have expired.

相关推荐: