home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / plug-ins / twain / tw_util.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-29  |  2.5 KB  |  72 lines

  1. /*  
  2.  * TWAIN Plug-in
  3.  * Copyright (C) 1999 Craig Setera
  4.  * Craig Setera <setera@home.com>
  5.  * 03/31/1999
  6.  *
  7.  * This program is free software; you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License as published by
  9.  * the Free Software Foundation; either version 2 of the License, or
  10.  * (at your option) any later version.
  11.  *
  12.  * This program is distributed in the hope that it will be useful,
  13.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.  * GNU General Public License for more details.
  16.  *
  17.  * You should have received a copy of the GNU General Public License
  18.  * along with this program; if not, write to the Free Software
  19.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  20.  *
  21.  *
  22.  * Based on (at least) the following plug-ins:
  23.  * Screenshot
  24.  * GIF
  25.  * Randomize
  26.  *
  27.  * Any suggestions, bug-reports or patches are welcome.
  28.  * 
  29.  * This plug-in interfaces to the TWAIN support library in order
  30.  * to capture images from TWAIN devices directly into GIMP images.
  31.  * The plug-in is capable of acquiring the following type of
  32.  * images:
  33.  * - B/W (1 bit images translated to grayscale B/W)
  34.  * - Grayscale up to 16 bits per pixel
  35.  * - RGB up to 16 bits per sample (24, 30, 36, etc.)
  36.  * - Paletted images (both Gray and RGB)
  37.  *
  38.  * Prerequisites:
  39.  *  This plug-in will not compile on anything other than a Win32
  40.  *  platform.  Although the TWAIN documentation implies that there
  41.  *  is TWAIN support available on Macintosh, I neither have a 
  42.  *  Macintosh nor the interest in porting this.  If anyone else
  43.  *  has an interest, consult www.twain.org for more information on
  44.  *  interfacing to TWAIN.
  45.  *
  46.  * Known problems:
  47.  * - Multiple image transfers will hang the plug-in.  The current
  48.  *   configuration compiles with a maximum of single image transfers.
  49.  */
  50.  
  51. /* 
  52.  * Revision history
  53.  *  (02/07/99)  v0.1   First working version (internal)
  54.  *  (02/09/99)  v0.2   First release to anyone other than myself
  55.  *  (02/15/99)  v0.3   Added image dump and read support for debugging
  56.  *  (03/31/99)  v0.5   Added support for multi-byte samples and paletted 
  57.  *                     images.
  58.  */
  59. #ifndef __TW_UTIL_H
  60. #define __TW_UTIL_H
  61. #include "twain.h"
  62.  
  63. void LogMessage(char *, ...);
  64. void LogLastWinError(void) ;
  65.  
  66. #ifdef _DEBUG
  67. void logBegin(pTW_IMAGEINFO, void *);
  68. void logData(pTW_IMAGEINFO, pTW_IMAGEMEMXFER, void *);
  69. #endif
  70.  
  71. #endif /* __TW_UTIL_H */
  72.