home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: Alpha / Whiteline Alpha.iso / progtool / c / tiff_lib / source / tif_ccit.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-09-22  |  1.9 KB  |  61 lines

  1. #pragma warn -use
  2. static char     *sccsid = "@(#)TIFF/tif_ccittrle.c 1.06, Copyright (c) Sam Leffler, Dieter Linde, "__DATE__;
  3. #pragma warn .use
  4. /*
  5.  * Copyright (c) 1988, 1990 by Sam Leffler, Oct 8 1990
  6.  * All rights reserved.
  7.  *
  8.  * This file is provided for unrestricted use provided that this legend is included on all tape media and as a part of the
  9.  * software program in whole or part.  Users may copy, modify or distribute this file at will.
  10.  *
  11.  * TIFF Library.
  12.  *
  13.  * CCITT Group 3 1-D Modified Huffman Run Length Encoding Compression Support
  14.  */
  15. #include "tiffio.h"
  16. #include "tif_fax3.h"
  17.  
  18. /****************************************************************************
  19.  *
  20.  */
  21. int
  22. TIFFInitCCITTRLE(
  23.     TIFF    *tif
  24.     )
  25. {
  26.            TIFFInitCCITTFax3(tif);            /* reuse G3 compression */
  27. /*      tif->tif_stripencode = NULL;
  28.         tif->tif_encoderow = NULL;
  29.         tif->tif_encodestrip = NULL;
  30.         tif->tif_close = NULL;*/
  31.  
  32.         /*
  33.          * This magic causes the regular G3 decompression code to not skip to the EOL mark at the end of
  34.          * a row, and to flush input data to a byte boundary at the end of each row.
  35.          */
  36.         tif->tif_options |= (FAX3_NOEOL | FAX3_BYTEALIGN);
  37.         return(1);
  38. }
  39.  
  40. /****************************************************************************
  41.  *
  42.  */
  43. int
  44. TIFFInitCCITTRLEW(
  45.     TIFF     *tif
  46.     )
  47. {
  48.         TIFFInitCCITTFax3(tif);            /* reuse G3 compression */
  49. /*      tif->tif_stripencode = NULL;
  50.         tif->tif_encoderow = NULL;
  51.         tif->tif_encodestrip = NULL;
  52.         tif->tif_close = NULL;*/
  53.  
  54.         /*
  55.          * This magic causes the regular G3 decompression code to not skip to the EOL mark at the end of
  56.          * a row, and to flush input data to a byte boundary at the end of each row.
  57.          */
  58.         tif->tif_options |= (FAX3_NOEOL | FAX3_WORDALIGN);
  59.         return(1);
  60. }
  61.