home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Graphics / graphics-16000.iso / win3x / viewers / hcsvga / hicolor.doc < prev    next >
Text File  |  1993-12-06  |  19KB  |  666 lines

  1.  
  2.  
  3.               H C   S V G A
  4.  
  5.                Version 1.3b
  6.                Dec. 6, 1993
  7.  
  8.      A Library for Tseng(tm) and VESA HiColor(tm) Graphics
  9.              and Turbo/Borland(tm) C
  10. Copyright 1990,1991,1993 Synergrafix Consulting.  All Rights Reserved
  11.  
  12.      HCSVGA is produced by:
  13.  
  14.            Steve Enns            Synergrafix Consulting 
  15.         44 Macdermid Cres.        - Custom Programming
  16.           Saskatoon, Sk.          - Graphical and Numerical Software
  17.           Canada S7J 2R2          - Hardware and Software Consultation
  18.  
  19.  
  20. ACKNOWLEDGEMENTS
  21.  
  22.      Thanks to all the contributors to the absolutely superb graphics
  23.      books:
  24.  
  25.     Graphics Gems    Academic Press, Edited by Andrew S. Glassner, 1990,
  26.             ISBN 0-12-286165-5
  27.  
  28.     Graphics Gems II  Academic Press, Edited by James Arvo, 1991,
  29.               ISBN 0-12-064480-0
  30.  
  31.      Thanks as well to some greatly inspirational and explicit code
  32.      by Michael Abrash in the November 1991 Doctor Dobbs Journal.
  33.  
  34.      Finally, great thanks to Daniel Lee Crocker and the Stone Soup
  35.      Group for numerous tremendous contributions to the public good
  36.      through PICLAB, and FRACTINT (the best program ever written) both
  37.      containing very enlightening Targa(tm) file code.
  38.  
  39.      Trademarks like GIF(tm) and PC(tm) are held by
  40.      their respective companies. 
  41.  
  42.  
  43. DISCLAIMER
  44.  
  45.      The HCSVGA library and associated files (the "package") is provided
  46.      without warranty of any kind.  The user of the HCSVGA package assumes
  47.      complete responsibility for any and all incidental or consequential
  48.      damages which may occur during normal or abnormal use of the
  49.      HCSVGA package.  Use the HCSVGA package at your own risk.
  50.  
  51.  
  52. LICENSE
  53.  
  54.      The entire HCSVGA package, including the HCSVGA library,
  55.      documentation, and sample files are Copyright 1990,1991,1992,1993
  56.      Synergrafix Consulting.  All rights reserved.  The HCSVGA
  57.      package may be freely distributed to others by any means, as
  58.      long the following (three) conditions are met:
  59.  
  60.       1) HCSVGA is distributed in a "package" containing
  61.       all the files listed in the HCREAD.ME file.
  62.  
  63.       2) HCSVGA is not distributed as part of any other
  64.       product, except with specific written permission from
  65.       the authors.
  66.  
  67.       3) NO fee of any kind is charged for the HCSVGA
  68.       package or for the service of providing the package,
  69.       except Computer Bulletin Board Systems or Services,
  70.       which may distribute the HCSVGA package even though they
  71.       may charge a membership or service fee.
  72.  
  73.  
  74.      If you are seriously interested in the source code for this 
  75.      library, then write me a letter with your proposed uses for
  76.      the code, and I'll return a quote for the price.  (Probably
  77.      $50.00-$100.00 with no royalties.)
  78.  
  79.  
  80. REQUIREMENTS
  81.  
  82.       HCSVGA requires the following:
  83.  
  84.            -    PC(tm)/XT(tm)/AT(tm)/386(tm) computer
  85.            -    TSENG 4000 based Video Card equipped with
  86.             at least 1 Megabyte of display memory, and
  87.             a Sierra HiColor(tm) DAC chip, or an ATI XL
  88.             HiColor equipped card, or a VESA compliant
  89.             driver for you HiColor capable card.
  90.            -    A compatible C compiler (currently 
  91.             probably only works with Borland(tm))
  92.     
  93.  
  94. EXAMPLES
  95.  
  96.      See the following files for exmaple code using the library:
  97.  
  98.  
  99.     - HCTGAV.C    View TGA(tm) files on your HiColor card.
  100.         - HCGIFV.C    View GIF(tm) files...
  101.         - HCMOUSE.C    Interactive mouse demo.
  102.         - HCART.C    Draw HiColor patterns.
  103.     - MAKEDEMO.BAT  Compile the demo programs.
  104.  
  105.  
  106. HISTORY
  107.  
  108.      - Version 1.0b Completed December 20 1991
  109.     Just a Beta version!  Lots more to be done...
  110.  
  111.      - Version 1.2b Completed May 20, 1993
  112.     Added support for other hardware - ATI XL (untested)
  113.     and VESA compliant boards, (like S3 based boards with
  114.     a HiColor DAC and a (bug free!) VESA bios.
  115.  
  116.      - Version 1.3b Completed Dec. 6, 1993
  117.     Small fixes to bring the demos programs up to date with
  118.     the library, and small additions to the hctgasize and 
  119.     hctgaview functions.
  120.  
  121. PROPOSED FUTURE ENHANCHMENTS
  122.  
  123.        I would like to hear from users of the library.  If no
  124.      one seems to be using the library, I won't release any
  125.      more versions.  I would appreciate bug reports, with
  126.      examples of failures, and suggestions for additions or
  127.      improvments to the library.  (I unfortunately cannot
  128.      promise that I will be able to reply to all enquiries or
  129.      comments, but I can promise that your comments will be
  130.      read and considered.  I can also definately NOT promise
  131.      to help with programming problems!)  Here are some ways
  132.      that I would like to improve the library:
  133.  
  134.      - I will probably make versions of the library for
  135.      Microsoft C 6.0 and Watcom 8.5. (especially if someone
  136.      pays me...)
  137.  
  138.      - I may combine this library with my SuperVGA library.
  139.  
  140.      - I would like samples of Targa(tm) files (or GIFs) which
  141.      do not display properly when loaded with the
  142.      HCTGAVIEW or HCGIFVIEW funtions.
  143.  
  144.      - Support for other graphics hardware.  Hopefully, we will
  145.      be able to support new hardware and graphics modes as they
  146.      are introduced. 
  147.  
  148.      - Faster GIF(tm) and Targa(tm) decoding and encoding
  149.  
  150.      - Faster everything else.
  151.  
  152.      - More primitives, like antialiased lines, circles and so on.
  153.  
  154.      - Small pop-up menu to work with the mouse
  155.  
  156.      - Real Documentation!
  157.  
  158.      - Support for 64k color modes.
  159.  
  160.  
  161.  
  162. FUNCTION SYNOPSES
  163.  
  164.  
  165.  - Graphics Macros/Defines
  166.  
  167.  
  168. #define HC_SVGALO    0    /* 640x350 */ /* Not all modes supported */
  169. #define HC_SVGAMED    1    /* 640x400 */ /* on all cards!!! */
  170. #define HC_SVGAHI    2    /* 640x480 */
  171. #define HC_SVGAHI2    3       /* 800x600 */
  172. #define HC_SVGAHI3    4    /* 1024x768 */
  173. #define HC_SVGAHI4    5       /* 1280x1024 */
  174.  
  175.  
  176. #define    XOR    0    /* BitBlt modes */
  177. #define OR    1
  178. #define COPY    2
  179.  
  180.  
  181. #define RGB256INT(r,g,b)    /* Make a HiColor color integer from
  182.                  Red, Green, Blue values (all in 0..255 range)*/
  183.  
  184. #define RGBINT(r,g,b)        /* Make a HiColor color integer from
  185.                  Red, Green, Blue values (all in 0..31 range)*/
  186.  
  187. #define INTRED(c)        /* Get Red component from HiColor color int */
  188. #define INTGREEN(c)             /*     Green */
  189. #define INTBLUE(c)        /*     Blue */
  190. #define INTRED256(c)        /*     Red (0..255) range */
  191. #define INTGREEN256(c)        /*     Green */
  192. #define INTBLUE256(c)              /*     Blue */
  193.  
  194.  
  195.  - Graphics Functions
  196.  
  197.  
  198. int hicolorDAC (void);
  199.  
  200.  
  201.     Check for existence of Sierra HiColor DAC hardware.
  202.  
  203.     Returns:    TRUE or FALSE
  204.  
  205.  
  206. int tseng4000 (void);
  207.  
  208.     Check for existence of TSENG 4000(tm) hardware.
  209.  
  210.     Returns:    TRUE or FALSE
  211.  
  212.  
  213. int hcsetmodetseng (int Mode);
  214.  
  215.     Set HiColor modes on TSENG 4000 HiColor hardware.  The MODE
  216.     is 0..3 and defined in HICOLOR.H  Not all modes are supported
  217.     on all cards.
  218.  
  219.     Returns:    TRUE or FALSE
  220.  
  221.  
  222. int hcmodesize(int picwidth,int picheight);
  223.  
  224.     Get a Mode number for the HCSETMODETSENG function above, given
  225.     the size of a picture that you would like to display.  This
  226.     function currently just finds the mininum screen height that will
  227.     accomadate a given picture size.
  228.  
  229.     Returns:    integer 0..3 corresponding to Mode number defined
  230.             in HICOLOR.H
  231.  
  232.  
  233. void hctextmode (void);
  234.  
  235.     Set the video to text mode (bios mode 3).
  236.  
  237.  
  238. void hcputpoint (WORD x, WORD y, WORD color);
  239.  
  240.     Put a single pixel at location (X,Y) on the HiColor mode
  241.     graphics screen.  color  is a integer 0..32767 made up
  242.     of three 5 bit numbers representing (red,green,blue).
  243.  
  244.     Use the RGBINT or RGB256INT macros to define a color
  245.     number from the red, green and blue components.
  246.     RGBINT defines a color integer given the red, green and
  247.     blue components as numbers from 0..31 (a "native" HiColor
  248.     15 bit color value.)  RGB256INT returns a color integer
  249.     given the red, green and blue components as numbers from
  250.     0..255 (a "true-color" 24bit color). INTRGB and INTRGB256
  251.     perform the reverse operation - they return the red, green
  252.     and blue color components given a 15 bit color integer.
  253.  
  254.  
  255. void hcputpointxor (WORD x, WORD y, WORD color);
  256.  
  257.     As above, except XOR the color with the existing color
  258.     at the (X,Y) location.
  259.  
  260.  
  261. void hcputpointrgb (WORD x, WORD y, WORD r, WORD g, WORD b);
  262.  
  263.     Place a single pixel, specifying location and red, green,
  264.     blue color components.
  265.  
  266.  
  267. WORD rgb265int (WORD r, WORD g, WORD b);
  268.  
  269.     Function corresponding to RGB256 macro.
  270.  
  271.     Returns:    Color integer.
  272.  
  273.  
  274. WORD rgbint (WORD r, WORD g, WORD b);
  275.  
  276.     Function corresponding to RGBINT macro.
  277.  
  278.     Returns:    Color integer
  279.  
  280.  
  281. void intrgb256 (WORD color, WORD *r, WORD *g, WORD *b);
  282.  
  283.     Function corresponding to INTRGB256.
  284.  
  285.  
  286. void intrgb (WORD color, WORD *r, WORD *g, WORD *b);
  287.  
  288.     Function corresponding to INTRGB.
  289.  
  290.  
  291. WORD hcgetpoint (WORD x, WORD y);
  292.  
  293.     Get the color value of a pixel at location (X,Y).
  294.  
  295.     Returns:    color integer, 0..32767
  296.  
  297.  
  298. void hcgetpointrgb (WORD x, WORD y, WORD *r, WORD *g, WORD *b);
  299.  
  300.     Get the red, green, blue color values of a pixel at
  301.     location (X,Y).
  302.  
  303.     Returns:    red, green, blue in range 0..31
  304.  
  305.  
  306. WORD hcgetmaxx (void);
  307.  
  308.     Return the maximum x coordinate for the current HiColor mode.
  309.  
  310. WORD hcgetmaxy (void);
  311.  
  312.     Return the minimum y coordinate for the current HiColor mode.
  313.  
  314.  
  315. void hchline (WORD x, WORD y, WORD x1, register WORD color);
  316.  
  317.     Plot a horizontal line from (X,Y) to (X1,Y) using "color."
  318.  
  319.  
  320. void hcvline (WORD x, WORD y, WORD y1, register WORD color);
  321.  
  322.     Plot a vertical line from (X,Y) to (X,Y1) using color.
  323.  
  324.  
  325. void hchlinexor (WORD x, WORD y, WORD x1, register WORD color);
  326.  
  327.     Plot a horizontal line from (X,Y) to (X1,Y), XORing
  328.     color with the existing color.
  329.  
  330.  
  331. void hcvlinexor (WORD x, WORD y, WORD y1, register WORD color);
  332.  
  333.     Plot a vertical line from (X,Y) to (X1,Y), XORing
  334.     color with the existing color.
  335.  
  336.  
  337. void hcrectangle (WORD x, WORD y, WORD x1, WORD y1, WORD color);
  338.  
  339.     Plot a rectangle from (X,Y) to (X1,Y1) using color.
  340.  
  341.  
  342. void hcrectanglexor (WORD x, WORD y, WORD x1, WORD y1, WORD color);
  343.  
  344.     Plot a rectangle from (X,Y) to (X1,Y1), XORing
  345.     color with the existing color.
  346.  
  347. void hcline(int a1, int b1, int a2, int b2, WORD lcolor);
  348.  
  349.     Plot a line from (X,Y) to (X1,Y1) in lcolor.
  350.  
  351.  
  352. void hclinexor(int a1, int b1, int a2, int b2, WORD lcolor);
  353.  
  354.     Plot a line from (X,Y) to (X1,Y1), XORing lcolor
  355.     with the existing color.
  356.  
  357.  
  358. void hccircle(WORD xc,WORD yc,WORD rad,WORD color);
  359.  
  360.     Plot a circle at (XC,YC) using radius rad and color.
  361.  
  362.  
  363. void hcfillcircle(WORD xc,WORD yc,WORD rad,WORD color);
  364.  
  365.     Plot a filled circle at (XC,YC) using radius rad and color.
  366.  
  367.  
  368. void hcbar (WORD x, WORD y, WORD x1, WORD y1, register WORD color);
  369.  
  370.     Plot a filled rectangle from (X,Y) to (X1,Y1).
  371.  
  372.  
  373. void hcclrscr (WORD color);
  374.  
  375.     Fill the entire screen with color.
  376.  
  377.  
  378. void hcputrow (WORD x, WORD y, register WORD w, register WORD *buf);
  379.  
  380.     Fill a row starting at (X,Y) of width w, using the colors
  381.     from lbuf.
  382.  
  383.  
  384. void hcputrowxor (WORD x, WORD y, register WORD w, register WORD *buf);
  385.  
  386.     Fill a row starting at (X,Y) of width w, XORing the colors
  387.     from lbuf with the existing colors.
  388.  
  389.  
  390. void hcputrowor (WORD x, WORD y, register WORD w, register WORD *buf);
  391.  
  392.     Fill a row starting at (X,Y) of width w, ORing the colors
  393.     from lbuf with the existing colors.
  394.  
  395.  
  396. void hcgetrow (WORD x, WORD y, register WORD w, register WORD *buf);
  397.  
  398.     Get a row starting at (X,Y) of width w, putting the colors
  399.     into lbuf.
  400.  
  401.  
  402. DWORD hcgetimagesize (register WORD left, register WORD top, register WORD right,register WORD bottom);
  403.  
  404.     Get the size in bytes required to "hcgetimage" an area of
  405.     the screen defined by (LEFT,TOP) to (RIGHT,BOTTOM).
  406.  
  407.     Returns:    unsigned long integer of the
  408.             size in bytes of the region.
  409.  
  410.  
  411. void hcgetimage (WORD left, WORD top, WORD right, WORD bottom, WORD *bitmap);
  412.  
  413.     Get the area of the screen from (LEFT,TOP) to (RIGHT,BOTTOM),
  414.     placing the colors into buffer bitmap.
  415.  
  416.  
  417. void hcputimage (WORD left, WORD top, WORD *bitmap, WORD drawtype);
  418.  
  419.     Put a bitmap onto the screen at position (LEFT,TOP), using
  420.     drawtype 0..2 (XOR, OR or COPY, as defined in HICOLOR.H).
  421.  
  422. void hcputchr (unsigned char ch, WORD xpos, WORD ypos, WORD fg, WORD background);
  423.  
  424.     Draw a single character ch at position (XPOS,YPOS) using foreground
  425.     color fg and background color BG.  The (XPOS,YPOS) position refers
  426.     to the top left of the character.  The characters are drawn using
  427.     the font from ROM.
  428.  
  429.  
  430. void hcputstr (char *str, WORD xpos, WORD ypos, WORD fg, WORD background);
  431.  
  432.     Draw a string onto the screen at position (XPOS,YPOS) using
  433.     foreground and background colors FG and BG.
  434.  
  435.  
  436. void hcfill(int x,int y,int ncolor);
  437.  
  438.     Flood fill a bounded area of the screen starting at (X,Y)
  439.     and using color ncolor.  All contiguous pixels that are the
  440.     same color as pixel (X,Y) will be filled with color ncolor.
  441.  
  442.  
  443. void hcpfill(int x,int y,int bordcol,WORD *pat,int pw,int ph);
  444.  
  445.     Flood fill a bounded area of the screen with a pattern
  446.     PAT, which is PW pixels wide and PH pixels high.  All
  447.     pixels not equal to bordcol will be filled with the pattern.
  448.     The pattern may be a simple array of integers, or may be
  449.     a bitmap captured from the screen, and converted using
  450.     HCIMAGETOPATTERN below.
  451.  
  452.  
  453. WORD *hcimagetopattern(WORD *bitmap,WORD *w,WORD *h);
  454.  
  455.     Convert a bitmap which was captured from the screen using
  456.     HCGETIMAGE into a pattern for use with HCPFILL.
  457.  
  458.     Returns:    WORD *pointer to a pattern, and the width
  459.             and height of the pattern.
  460.  
  461.  
  462.  - Mouse Macros/Defines
  463.  
  464.  
  465. #define GRCURSORSIZEX    11    /* Max. graphics cursor width in pixels */
  466. #define GRCURSORSIZEY    15    /* Max. cursor height in pixels + 1 */
  467. #define GRCURSORNUM    10    /* Max number of default and definable cursors */
  468.  
  469. #define ARROWCURSOR        0    /* Graphics cursor types */
  470. #define SMALLARROWCURSOR    1
  471. #define CROSSHAIR        2
  472. #define SMALLCROSSHAIR        3
  473. #define DIAGCROSSHAIR        4
  474.  
  475. typedef int    grcursortype[GRCURSORSIZEX][GRCURSORSIZEY];
  476. typedef char    mousestr[80];
  477.  
  478.  
  479.  - Mouse functions
  480.  
  481. int  initmouse(void);                /* Init. mouse driver */
  482.  
  483.     Low-level mouse initialization routine.  Checks for
  484.     mouse driver, initializes.
  485.  
  486.     Returns:    TRUE for success.
  487.  
  488.  
  489. void showmouse(void);                /* Show (text) cursor */
  490.  
  491.     Show cursor (text mode only).
  492.  
  493.  
  494. void hidemouse(void);                /* Unshow (text) cursor */
  495.  
  496.     Hide cursor (text mode only).
  497.  
  498.  
  499. void getmouse(int *x,int *y,int *buttons);/* Get position */
  500.  
  501.     Get current mouse position (X,Y) and button state (BUTTONS).
  502.  
  503.  
  504. void putmouse(int x,int y);            /* Place mouse */
  505.  
  506.     Set mouse position to (X,Y).
  507.  
  508.  
  509. void getmousebuttonon(int button,int *buttonstate,
  510.               int *numpresses,int *x,int *y);/* Get buttons pressed */
  511.  
  512.     Get mouse button press state. Returns number of presses, (X,Y)
  513.     location.
  514.  
  515.  
  516. void getmousebuttonoff(int button,int *buttonstate,
  517.                int *numreleases,int  *x,int *y);/* Get buttons released */
  518.  
  519.     Get mouse button release state. Returns number of releases, (X,Y)
  520.     location.
  521.  
  522.  
  523. void setmouserange(int x,int y,int x1,int y1);    /* Set range */
  524.  
  525.     Restrict the movement of the mouse to the rectangle defined
  526.     by (X,Y) of (X1,Y1).
  527.  
  528.  
  529. void getmousemotion(int *x,int *y);        /* Get movement */
  530.  
  531.     Return mouse movement in (X,Y).
  532.  
  533.  
  534. void setmousemove(int x,int y);            /* Set sensitivity */
  535.  
  536.     Set mouse sensitivity to (X,Y).
  537.  
  538.  
  539. void setgrcursor(int index,grcursortype newgrcursor);/* Set cursor bitmap */
  540.  
  541.     Set the type of graphics cursor to be used to index.
  542.     Predefined cursors are defined as 0..4 in HICOLOR.H.
  543.  
  544.  
  545. void putgrcursor(int x,int y);        /* Place graphics cursor */
  546.  
  547.     Put the graphics cursor at location (X,Y).
  548.  
  549.  
  550. void unputgrcursor(void);        /* Remove graphics cursor */
  551.  
  552.     Remove the previous placed graphics cursor.
  553.  
  554.  
  555. int getgrcursorx(void);                 /* Get current postn */
  556.  
  557.     Get current horizontal graphics cursor position.
  558.  
  559.     Returns:    Current X position.
  560.  
  561.  
  562. int getgrcursory(void);
  563.  
  564.     Get current vertical graphics cursor position.
  565.  
  566.     Returns:    Current Y position.
  567.  
  568.  
  569. int initgrcursor(int grcursorindex,int color);/* Init. graphics cursor */
  570.  
  571.     Initialize the graphics cursor to grcursorindex and color,
  572.     where grcursorindex is the cursor type to use.
  573.  
  574.  
  575. void closegrcursor(void);
  576.  
  577.     Remove, deinitialize the graphics cursor.
  578.  
  579.  
  580.  - TARGA(tm) Macros/Defines
  581.  
  582.  
  583. #define HCTGACANTOPEN    -1
  584. #define HCTGANOMEM    -2
  585. #define HCTGANOTSUPPORTED -3
  586. #define HCTGACANTREAD    -4
  587. #define HCTGACANTWRITE    -5
  588.  
  589. #define MAXTGAXWIDTH    1280
  590. #define MAXTCOMMENT    256
  591.  
  592. extern unsigned char tcomment[MAXTCOMMENT];
  593. extern unsigned char tcommentsize;
  594.  
  595.  
  596.  - TARGA(tm) Functions
  597.  
  598. int hctgasize(char *fname,int *w,int *h,int *pixsize,int *ox,int *oy,int *type,int *comp,int *mapp,BYTE *csize,BYTE *comm);
  599.  
  600.     Get the size of a Targa(tm) file FNAME.
  601.  
  602.     Returns:    Width W and Height H, pixel size in PIXSIZE,
  603.             origin in OX, OY, Targa type in TYPE.  COMP and
  604.             MAP will be returned if the file is compressed and/or
  605.             has a colormap, and the size (in bytes, CSIZE) of the
  606.             comment COMM.
  607.  
  608. int hctgaview(char *fname,int x,int y,int x1,int y1,int dither,int jitter);
  609.  
  610.     Display the Targa(tm) file FNAME in the rectangle defined by
  611.     (X,Y) and (X1,Y1).  If DITHER/JITTER is TRUE, then dither/jitter 24
  612.     or 32 bit images while displaying.  Image will be displayed starting
  613.     at (X,Y) and clipped to (X1,Y1).  If X is -1, then the image will be
  614.     centered horizontally on the screen, if Y is -1, then the image will
  615.     be centered vertically on the screen.
  616.  
  617.     Returns:    0 for success or an error code as
  618.             defined in HCTARGA.H
  619.  
  620. int hctgasave(char *fname,int x,int y,int x1,int y1,int compressed,BYTE csize,BYTE *comm);
  621.  
  622.     Save the rectangular region of the screen defined by (X,Y)
  623.     and (X1,Y1) to a Targa-16(tm) file FNAME.  Save as a compressed
  624.     file if COMPRESSED is TRUE, use a comment of length CSIZE (up to
  625.     255 characters) from COMM.  Defaults to the entire screen if
  626.     (X,Y) is (-1,-1) and (X1,Y1) is (-1,-1).
  627.  
  628.     Returns:    0 for success or an error code as defined in
  629.             HCTARGA.H
  630.  
  631.  
  632.  
  633.  - GIF(tm) Macros/Defines
  634.  
  635.  
  636. #define HCGIFCANTOPEN    -1
  637. #define HCGIFNOMEM    -2
  638. #define HCGIFBADGIF    -3
  639. #define HCGIFNOTGIF    -4
  640.  
  641.  
  642.  - GIF(tm) Functions
  643.  
  644.  
  645. int hcgifsize(char *filename,int *width,int *height,long offset);
  646.  
  647.     Get the size of a GIF(tm) file FNAME, reading FNAME starting
  648.     at position OFFSET.
  649.  
  650.     Returns:    Width W and Height H, and the size
  651.             of the comment COMM, in bytes, CSIZE.
  652.  
  653.  
  654. int hcgifview(char *filename,int xs,int ys,long offset,int autoscale);
  655.  
  656.     Display the GIF(tm) file FNAME starting at position (XS,YS),
  657.     reading FNAME starting at position OFFSET.  If AUTOSCALE is
  658.     TRUE, then sky the image up to try to fill the available area.
  659.     If XS is -1 then the width of the image will be centered on the
  660.     screen, and if YS is -1 then the height of image will be centered
  661.     on the screen. 
  662.  
  663.     Returns:    0 for success or an error code as
  664.             defined in HCTARGA.H
  665.  
  666.