[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
ShowTIFWin()
Displays a TIFF window image file
Syntax
ShowTIFWin(<cFILE.TIF>, <nXOrigin>, <nYOrigin>, [<Options>])
Arguments
<cFILE.TIF>
Name of the TIFF image file, and optional drive and path.
<nXOrigin>
Horizontal starting coordinate of the image.
<nYOrigin>
Vertical starting coordinate of the image.
<Options>
NOBLANK, FORCEMODE, NOPALETTE.
Returns
0
Success.
-1
Can not open <cFILE>.
-2
This is not an TIFF 4.2/5.0 file.
-3
Unable to find a graphic mode for this image. For SVGA display,
SUNVIDEO.DRV and SUNFONTS.DRV need to be in the same directory as the
application.
-4
Cannot allocate memory for line buffers.
-5
LSEEK error: file is truncated.
-6
This TIFF file type is not supported.
-7
Image width tag is missing.
-8
Image height tag is missing.
-99
Parameters are invalid.
Remarks
ShowTIFWin() displays only 8-bit TIFF 4.2/5.0 image files at the specified
coordinates. TIFF compression types supported: No compression, CCITT
Modified Huffman RLE, CCITT Group 3-1D FAX, and Macintosh RLE.
TIFF Compression types not supported: CCITT Group 3-2D FAX, CCITT Group
4-2D FAX, LZW (Limpel-Ziv and Welch), NEXT 2-bit RLE, Thunderscan RLE, Old
Pixar RLE, Silicon Graphics RLE, 24-bit RGB and Planar, JPEG-in-TIFF 6.0.
Example
// Show image PHILO.TIF in a window originating at (9,12):
ShowTIFWin("PHILO.TIF", 9, 12)
// Show the image LICENCE.TIF in a window originating at
// (19,22) with display options NOBLANK, FORCEMODE and
// NOPALETTE
ShowTIFWin("LICENCE.TIF", 19, 22,
FORCEMODE+NOPALETTE+NOBLANK)
// Example: "SHOWTIF.PRG"
cFileName = "FILE.TIF"
nStatus = ShowTIF(cFileName)
IF nStatus < 0
DO CASE
CASE nStatus = -1
? "Cannot open ", cFileName
CASE nStatus = -2
? cFileName, " is not a TIF 4.2/5.0 file"
CASE nStatus = -3
? "Unable to find a graphic mode for this image"
CASE nStatus = -4
? "Cannot allocate memory for line buffers"
CASE nStatus = -5
? "LSEEK error: file is truncated"
CASE nStatus = -6
? "This TIF file type is not supported"
CASE nStatus = -7
? "Image width tag is missing"
CASE nStatus = -8
? "Image height tag is missing"
CASE nStatus = -99
? "Parameters are invalid"
ENDCASE
RETURN
ENDIF
ch = 0
DO WHILE ch = 0
ch = INKEY()
ENDDO
TextMode()
For other examples of how to use the Show<EXT>() display functions, see
SHOW.PRG, an example program distributed with Sunshow.
See Also: ShowTIF()
Online resources provided by: http://www.ClipX.Net --- NG 2 HTML conversion by Dave Pearson