Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Sunshow Pro V3.0 - <b>showtif</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
ShowTIF

Display a TIFF image


Syntax

SHOWTIF <cFILENAME.TIF>


Arguments

<cFILENAME.TIF>
Name of the TIF image file, with optional drive and path.


DOS Error Messages:

Can not open <cFILENAME.TIF>
This is not an TIFF 4.2/5.0 file
Unable to find a graphic mode for this image
Cannot allocate memory for line buffers
LSEEK error: file is truncated
This TIFF file type is not supported
Image width tag is missing
Image height tag is missing


Remarks

ShowTIF displays TIFF 4.2/5.0 Formats. This Tif display module supports the 
TIFF 4.2 & 5.0 standards as specified in the Aldus/Microsoft Technical 
Memorandum of 8/8/88 and later. The TIFF format is a tag based file format 
designed to promote the more universal interchange of digital image data. 
The format is primarily designed by scanner vendors for desktop publishing 
and other print/scan based applications. As such, it is not as useful for 
display purposes as other file formats.

TIFF is a pointer-based, image format. While somewhat similar to GIF, TIFF 
is much more complex and also more flexible in its formatting of field data. 
The initial header of a TIFF file contains only 8 bytes. All information and 
parameters relating to the image and its structure are contained in tag 
fields. 

TIFF 5.0 has the capacity of 45 tag fields; only some are required. There 
are separate fields for a variety of information relating to the image: each 
image dimension, creating computer, model, artist, description, software, 
date, etc. There are some required fields which contain default values. Not 
all fields are necessary to display an image, but some tag fields if left 
out will cause distortion. 

TIFF has the capability of displaying strange aspect ratios and unusual 
width/heights. The intent of the TIFF format is to be a universal standard 
supporting a number of features: several different compression schemes, 
special image control functions, etc.

TIFF 5.0 has four TIFF classes:

1.  TIFF-B (bilevel 1-bit images) 
2.  TIFF-G (grey scale images) 
3.  TIFF-P (palette color images) 
4.  TIFF-RGB (rgb full color images) 
5.  And a superclass: TIFF-X which is all encompassing: supporting all four 
    types. 

Each class of a TIFF needs only minimum tag fields related to its  type to 
operate and other fields may not be needed or are not required. After the 8 
byte header the data do not need to be in a specific order.

The Image File Directory (IFD) contains a list of the tag fields in the 
image file. The offset of each directory entry points to the actual location 
of the information in the file. Therefore image information can be stored in 
"strips" in any location within the file. It is recommended that the strips 
be about 8k in length, however, they may be any length. The default is one 
strip containing the entire image file.

TIFF, like the GIF format, supports multiple images (subfiles) in a single 
file. Within the IFD the last entry must be 0000 for the end-of-file-marker 
or a pointer to the next image's (subfile) IFD.

Contrary to what many think, TIFF does supports color - and with two 
methods: TIFF-P (8-bit) which is similar to GIF, and TIFF-R which is used 
for full 24-bit rgb images.


TIFF-P 8-bit format

TIFF-P is limited to 8-bit images or 256 colors. A single field is used for 
the color map. The image data are stored as codes relative to the 48-bit 
palette color map. 16 bits are used for red, green, and blue color planes 
and the 2-byte word is the basic unit in this case.


TIFF-R 24-bit RGB format

The TIFF-R is a very large, high resolution format where each pixel is 
represented by three 8-bit RGB values with a capacity of over 16 million 
colors.

The TIFF image control features are contained in optional fields and 
probably are not necessary in most applications. For special requirements, 
the ability to redefine the white point, the primary chromaticities, set 
aspect ratio specifications, and the ability to define your own special tag 
field may be important features of the TIFF format. In some cases NTSC 
standards for television monitors may require some of these extra fields. 
In other cases, the equipment you are using may require aspect ratio 
modification for proper display. This is useful for nonstandard pixel aspect 
ratios.

TIFF currently supports LZW compression, CCITT Group 3 1-Dimensional 
Modified Huffman RLE, and Macintosh Packbit image compression schemes.


Example

Show the TIFF image FORD1.TIF:
SHOWTIF FORD1.TIF



See Also: ShowCEG ShowCUT ShowICO ShowIFF ShowJPEG ShowIMG ShowSTY ShowXPM

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson