home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / delphi / imagelib / imglib30.tx_ / imglib30.tx
Text File  |  1995-10-22  |  30KB  |  621 lines

  1. ImageLib DLL 3.0(c) 1995 by:
  2.  
  3. SkyLine Tools
  4.  
  5. Technical support  for C, C++, Kevin Adams:  (CIS) 74742,1444
  6.  
  7. The Imglib30.dll is an inexpensive way to add JPEG, GIF, BMP, PCX and PNG
  8. graphic formats to your applications. Yes, there are image libraries
  9. supporting many more formats than ImageLib, but those libraries are more
  10. expensive and carry more overhead to your applications.  The ImageLib DLL
  11. supports the reading and writing of JPEG, GIF, BMP, PCX, and PNG images
  12. from memory or from a file. The ImageLib DLL supports the use of an optional
  13. callback function in the calling application.  The callback can provide
  14. progress displaying of read and write functions and the ability to cancel
  15. read functions in progress. The DLL also provides functions to retrieve 
  16. information about an image in memory or in a file without reading the whole
  17. image.  The functions return type of image, compression, width, height,
  18. bits per pixel, number of planes, and number of colors.  The memory functions
  19. of the ImageLib DLL are specifically designed to support database BLOB
  20. operations.  All calls return error codes and the DLL will optional display
  21. error messages.  The error codes refer to error text strings located in
  22. a string table resource inside the DLL.  The DLL supports Device Dependent
  23. Bitmaps(DDB) or Device Independent Bitmaps(DIB) in the reading and writing
  24. of images. The ImageLib DLL contains a sophisticated color quantization
  25. engine that can be used when reading and writing images.  When reading an image,
  26. settings can be used so that the bitmap that is returned is of the resolution
  27. you specify and is independent of the input image.  If the developer wants all
  28. images to be passed back as 256 color 8 bit dithered images then all bitmaps 
  29. passed back will be 8 bit whether they where originally 24 bit or 4 bit.  The
  30. color quantizer is designed to produce the best image possible at the desired
  31. resolution.  When writing an image the developer may specify the resolution of
  32. the image to be written and the image will be that be written (if that resolution
  33. is valid for the image type) at that resolution.   
  34.  
  35.  
  36. The examp30.zip file includes
  37.  
  38. Examp30.IDE          Project file for Borland C++ OWL2 examples
  39. IMAGEVW.CPP          Main file for example showing image memory I/O with DDB's
  40. IMGVW2.CPP           Main file for example showing image file I/O with DDB's
  41. IMGDIBVW.CPP         Main file for example showing image memory I/O with DIB's
  42. IMDIBVW2.CPP         Main file for example showing image file I/O with DIB's
  43. IMAGEVW .RC          Resource file for all examples
  44. IMGLIB30.LIB         Import Lib file for DLL  
  45. IMGLIB30.H           Header File for DDB DLL calls
  46. IMGDIB.H             Header File for DIB DLL calls
  47. VIEWDLG .CPP         Source file for Dialog boxes for examples 
  48. IMAGEVW.H            Header file for all examples   
  49. VIEWDLG.H            Header file for Dialog Boxes 
  50. IMAGEVW.DEF          
  51. IMGLIB30.DLL         ImageLib DLL 3.0
  52.  
  53. Installation Instructions
  54.  
  55. Copy the imglib30.dll  to a directory on your path or
  56. to the windows\system directory.
  57.  
  58. Image Formats Supported:
  59.  
  60. JPEG 
  61. GIF
  62. PCX 
  63. BMP
  64. PNG
  65.  
  66. Installation Instructions for the Examples
  67.  
  68. The examples will read and write PNG, JPG, GIF, PCX, and BMP format files.
  69. The four examples look identical and perform the same things using different
  70. sets of calls from the DLL.  You can compile and run the examples by loading
  71. the project file in Borland C++ 4.5 (It would probably also work for 4.0 or above)
  72. and rebuild it.  NOTE:  Remember to check the Project settings to ensure you
  73. have the right directories for the Borland Compiler.
  74.  
  75. Color Quantizer
  76.  
  77. The color quantizer is used to reduce an image to a lower bit depth with out
  78. loosing as much quality as possible.  The color quantizer will analysis the input
  79. image and produce an optimized color palette using the maximum number of colors
  80. allowed for the output bit depth.  The color quantizer will then reduce the input
  81. image by mapping the input image pixels to the output image pixels through the 
  82. optimize color palette.  This can be done with dithering or without dithering.  
  83. In most cases dithering produces better results.  Input images that have a bit
  84. depth of 8 or higher can be reduced.  Input images of 1 to 4 bits will not be 
  85. reduced.  The reduction options are:
  86.  
  87.    24 bit 16.7 million color to 8 bit 256 color
  88.    24 bit 16.7 million color to 4 bit 16 color
  89.    8 bit 256 color to 4 bit 16 color
  90.  
  91. Note that the 16 color output image is uses an optimized color palette based on
  92. the input image and not the windows system palette.  This means that with VGA 
  93. modes the 16 color output may not look good because the optimize 16 color 
  94. palette does not match the windows system palette.
  95.  
  96. DLL Calls
  97.  
  98. There are four different calls that essential do the same thing but either
  99. take their input differently or provide their output differently.  The first
  100. set will be described individually, but afterwards all four in a set will be
  101. listed followed by one description.
  102. ______________________________________________________________________________
  103.  
  104. int readjpgfile(const char *filename, int resolution, int scale, int dither,
  105.                 int password, unsigned int * hddb, unsigned int * hpal,
  106.                 short (*pf) (int), short errormode);
  107.  
  108. This function is passed a filename of a JPG file; integer for resolution, scale,
  109. option, and password and returns unsigned integer pointers (Handles) to a
  110. HBITMAP and a HPALETTE to the resulting bitmap and palette.  It returns
  111. one on success or a negative integer indicating an error code on failure.
  112. The errormode parameter indicates whether or not the DLL will display error
  113. messages internally.  If the input JPG file contains a Grayscale image then
  114. the resolution and option input parameters will be automatically over-ridden.
  115.  
  116. resolution            4:  4 bit    (16 colors)
  117.                 8:  8 bit   (256 colors)
  118.                 24: 24 bit  (16 Million colors)
  119.  
  120. scale                1:  1/1 normal size
  121.                 2:  1/2 size    
  122.                 4:  1/4 size
  123.                 8:  1/8 size
  124.  
  125. dither                          0:  No dithering
  126.                                 1:  Dither
  127.  
  128. password            When you purchase you will receive this.
  129.                 Disables Trial Version messages.
  130.  
  131. hddb                Pointer to bitmap handle
  132.  
  133. hpal                Pointer to palette handle
  134.  
  135. pf                Pointer to a callback function defined as:
  136.                      short pf (int);
  137.  
  138. errormode                       0 : Do not show error messages in DLL
  139.                                 1 : Display error messages in DLL
  140.                 
  141. Callback Notes:  If no callback function is defined then pass NULL for pf.
  142.                  If a callback function is used then the function will be called
  143.                  periodically with an integer input value containing a value
  144.                  between 0 and 100 denoting how much of the current operation has
  145.                  been completed.  The application's callback function must return
  146.                  a short value indicating status.  A return of 1 means to continue
  147.                  with the function and a return of 0 means to cancel the
  148.                  function.  If the function gets back a 0 it will cancel the
  149.                  reading of the image and return a valid bitmap and palette handle
  150.                  containing as much of the image that was complete before being
  151.                  canceled.  The read function will still return a one value
  152.                  even if the function was canceled via the callback.
  153.  
  154. Errormode Notes: All of the DLL calls will return a 1 for success or a negative
  155.                  number that is an error code.   All of the error codes have
  156.                  text string equivalents located in a string table resource
  157.                  inside of the DLL.  The first example imgview illustrates how
  158.                  to access the strings.  If you want to control what error
  159.              messages are displayed to the user the use 0 so that the DLL
  160.                  will not automatically display error messages.
  161. _____________________________________________________________________________
  162.  
  163. int rdjpgfiledib(const char *filename, int resolution, int scale, int dither,
  164.                 int password, unsigned int *hdib, short (*pf) (int),
  165.                 short errormode);
  166.  
  167. This function is the same as the "readjpgfile" function except that it return
  168. a pointer to a DIB (hdib) HANDLE rather that a pointer to a DDB and palette HANDLE.
  169.  
  170. hdib             Pointer to a DIB handle.
  171. ______________________________________________________________________________
  172.  
  173.  
  174. int readjpgstream(void * inbuffer, long size, int resolution, int scale,
  175.                   int dither, int password, unsigned int * hddb, unsigned int * hpal,
  176.                   short (*pf) (int), short errormode);
  177.  
  178.  
  179. This function is the equivalent to the "readjpgfile" function above except that
  180. input is from a pointer to a global memory location that contains a JPEG image
  181. and the size input parameter contains the size of the JPEG image in bytes.  
  182.  
  183. inbuffer            A pointer to a memory location that contain the input image.
  184.                     The memory location should have preferably been globally
  185.                     allocated.
  186.  
  187. size                This is a long value containing the number of bytes in
  188.                     the buffer.
  189. _____________________________________________________________________________
  190.  
  191. int rdjpgstreamdib(void * inbuffer, long size, int resolution, int scale,
  192.                   int dither, int password, unsigned int * hdib,
  193.                   short (*pf) (int), short errormode);
  194.  
  195. This is the same as the "readjpgstream" except it returns a pointer to a DIB
  196. HANDLE rather than a DDB and Palette HANDLE.
  197. _____________________________________________________________________________
  198.  
  199. int writejpegfile(const char * filename,  int quality, int smooth, int password,
  200.                   unsigned int hddb, unsigned int hpal, short (*pf)(int),
  201.                   short errormode);
  202.  
  203. int writejpegstream(void * inbuffer, long * size,  int quality, int smooth,
  204.                    int password, unsigned int hddb, unsigned int hpal,
  205.                    short (*pf)(int), short errormode);
  206.  
  207. int wrjpegfiledib(const char * filename,  int quality, int smooth, int password,
  208.                   unsigned int hdib, short (*pf)(int), short errormode);
  209.  
  210. int wrjpegstreamdib(void * inbuffer, long * size,  int quality, int smooth,
  211.                     int password, unsigned int hdib, short (*pf)(int),
  212.                     short errormode);
  213.  
  214. These functions are passed a filename or a pointer to a buffer or size to write a
  215. JPEG image to.  The inputs are either HANDLES to a DDB and logical palette or 
  216. a HANDLE to a DIB.  The quality and smooth parameters describe the amount of 
  217. compression and any smoothing desired.  Output size of the file or memory stream 
  218. is based on the size input and the value of the quality parameter.  
  219.  
  220. filename                A pointer to a string containing a name and path of 
  221.                         output file.
  222.  
  223. inbuffer                A pointer to a memory location where the output image
  224.                         will be written.
  225.  
  226. size                    A pointer to a long value that will indicate on return
  227.                         how much of the memory location was actually used to
  228.                         store the output image.
  229.  
  230. quality         0..100   
  231.             0 is poor and 100 excellent.  We  normally use
  232.                         75 to have a reasonable quality with 1/10 savings
  233.                         in size from 24-bit data.
  234.  
  235. smooth            0..100    
  236.             0 is no smoothing  and 100  is full smoothing. 
  237.  
  238. password        Purchase
  239.  
  240. hddb            Device Dependent Bitmap handle (not a pointer!)
  241.  
  242. hpal            Logical Palette handle (not a pointer!)
  243.  
  244. hdib                    Device Independent Bitmap handle(not a pointer!)
  245.  
  246. pf            Pointer to a callback function defined as:
  247.              short pf (int);
  248.                 
  249. Callback Notes:  For write functions the callback return value is not used.
  250.                  It is not possible to cancel a write function.
  251. ______________________________________________________________________________
  252.  
  253. int readgiffile(const char *filename, int resolution, int password, int dither,
  254.                 unsigned int * hddb, unsigned int * hpal, short (*pf)(int),
  255.                 short errormode);
  256.  
  257. int readgifstream(void * inbuffer, long size, int resolution, int dither,
  258.                   int password, unsigned int * hddb, unsigned int * hpal,
  259.                   short(*pf)(int), short errormode);
  260.  
  261. int rdgiffiledib(const char *filename, int resolution, int dither, 
  262.                  int password, unsigned int * hddb, unsigned int * hpal,
  263.                  short (*pf)(int), short errormode);
  264.  
  265. int rdgifstreamdib(void * inbuffer, long size, int resolution, int dither,
  266.                    int password, unsigned int * hddb, unsigned int * hpal,
  267.                    short(*pf)(int), short errormode);
  268.  
  269. These functions take as input a file or memory stream pointing to a GIF image.
  270. It returns pointers to a bitmap Handle and a palette Handle or a DIB Handle.
  271. A return value of one is success,  a negative number is failure and refers
  272. to an error code.  The bitmap returned will be based on the resolution and
  273. dither parameters.  The output will have a bit depth equal to the resolution
  274. no matter what the input resolution is.  The Dither parameter indicates to
  275. use dithering if the color quantitization engine is going to reduce the bit
  276. depth of the input image. Interlaced and non-interlaced GIF images are 
  277. supported.
  278.  
  279. filename                A pointer to a string containing a name and path of 
  280.                         output file.
  281.  
  282. inbuffer                A pointer to a memory location that contains the input image.
  283.                         The memory location should have preferably been globally
  284.                         allocated.
  285.  
  286. size                    This is a long value containing the number of bytes in
  287.                         the buffer.
  288.  
  289. resolution        4:  4 bit    (16 colors)
  290.             8:  8 bit   (256 colors)
  291.                         24: 24 bit   (16.7 million colors)
  292.  
  293. dither                  0:  No dithering
  294.                         1:  Dither
  295.  
  296. password        When you buy you will receive this.
  297.             Disables Trial Version messages.
  298.  
  299. hddb            Pointer to bitmap handle
  300.  
  301. hpal            Pointer to palette handle
  302.  
  303. pf            Pointer to a callback function defined as:
  304.              short pf (int);
  305.  
  306. errormode               0 : Do not show error messages in DLL
  307.                         1 : Display error messages in DLL
  308.  
  309. ______________________________________________________________________________
  310.  
  311. int writegiffile(const char * filename,  int resolution, int password,
  312.                  unsigned int hddb, unsigned int hpal, short (*pf)(int),
  313.                  short errormode);
  314.  
  315. int writegifstream(void * inbuffer, long * size,  int resolution, 
  316.                    int password, unsigned int hddb, unsigned int hpal,
  317.                    short (*pf)(int), short errormode);
  318.  
  319. int wrjgiffiledib(const char * filename,  int resolution, int password,
  320.                   unsigned int hdib, short (*pf)(int), short errormode);
  321.  
  322. int wrgifstreamdib(void * inbuffer, long * size,  int resolution,
  323.                    int password, unsigned int hdib, short (*pf)(int),
  324.                    short errormode);
  325.  
  326. These functions are passed a filename or a pointer to a buffer or size to write a
  327. GIF image to.  The inputs are either HANDLES to a DDB and logical palette or 
  328. a HANDLE to a DIB.  The resolution parameter describes the bit depth of the output
  329. image.  For GIF images a 24 bit output bit depth is invalid. Output size of the file
  330. or memory stream is based on the size input and the value of the resolution
  331. parameter.  The input bitmap's bit depth will be raised or lowered as necessary
  332. according to the resolution parameter. Output image is not interlaced.
  333.  
  334. filename                A pointer to a string containing a name and path of 
  335.                         output file.
  336.  
  337. inbuffer                A pointer to a memory location where the output image
  338.                         will be written.
  339.  
  340. size                    A pointer to a long value that will indicate on return
  341.                         how much of the memory location was actually used to
  342.                         store the output image.
  343.  
  344. resolution        4:  4 bit    (16 colors)
  345.             8:  8 bit   (256 colors)
  346.                         24: 24 bit   (16.7 million colors) (Invalid for GIF!)
  347.  
  348. password        Buy
  349.  
  350. hddb            Device Dependent Bitmap handle (not a pointer!)
  351.  
  352. hpal            Logical Palette handle (not a pointer!)
  353.  
  354. hdib                    Device Independent Bitmap handle(not a pointer!)
  355.  
  356. pf            Pointer to a callback function defined as:
  357.              short pf (int);
  358.  
  359. errormode               0 : Do not show error messages in DLL
  360.                         1 : Display error messages in DLL
  361.  
  362. ______________________________________________________________________________
  363.  
  364. int readpcxfile(const char *filename, int resolution, int password, int dither,
  365.                 unsigned int * hddb, unsigned int * hpal, short (*pf)(int),
  366.                 short errormode);
  367.  
  368. int readpcxstream(void * inbuffer, long size, int resolution, int dither,
  369.                   int password, unsigned int * hddb, unsigned int * hpal,
  370.                   short(*pf)(int), short errormode);
  371.  
  372. int rdpcxfiledib(const char *filename, int resolution, int dither, 
  373.                  int password, unsigned int * hddb, unsigned int * hpal,
  374.                  short (*pf)(int), short errormode);
  375.  
  376. int rdpcxstreamdib(void * inbuffer, long size, int resolution, int dither,
  377.                    int password, unsigned int * hddb, unsigned int * hpal,
  378.                    short(*pf)(int), short errormode);
  379.  
  380. These functions take as input a file or memory stream pointing to a PCX image.
  381. It returns pointers to a bitmap Handle and a palette Handle or a DIB Handle.
  382. A return value of one is success,  a negative number is failure and refers
  383. to an error code.  The bitmap returned will be based on the resolution and
  384. dither parameters.  The output will have a bit depth equal to the resolution
  385. no matter what the input resolution is.  The Dither parameter indicates to
  386. use dithering if the color quantitization engine is going to reduce the bit
  387. depth of the input image. 
  388.  
  389. ______________________________________________________________________________
  390.  
  391. int writepcxfile(const char * filename,  int resolution, int password,
  392.                  unsigned int hddb, unsigned int hpal, short (*pf)(int),
  393.                  short errormode);
  394.  
  395. int writepcxstream(void * inbuffer, long * size,  int resolution, 
  396.                    int password, unsigned int hddb, unsigned int hpal,
  397.                    short (*pf)(int), short errormode);
  398.  
  399. int wrpcxfiledib(const char * filename,  int resolution, int password,
  400.                   unsigned int hdib, short (*pf)(int), short errormode);
  401.  
  402. int wrpcxstreamdib(void * inbuffer, long * size,  int resolution,
  403.                    int password, unsigned int hdib, short (*pf)(int),
  404.                    short errormode);
  405.  
  406. These functions are passed a filename or a pointer to a buffer or size to write a
  407. PCX image to.  The inputs are either HANDLES to a DDB and logical palette or 
  408. a HANDLE to a DIB.  The resolution parameter describes the bit depth of the output
  409. image.  Output size of the file or memory stream is based on the size input
  410. and the value of the resolution parameter.  The input bitmap's bit depth
  411. will be raised or lowered as necessary according to the resolution parameter. 
  412.  
  413. ______________________________________________________________________________
  414.  
  415. int readbmpfile(const char *filename, int resolution, int password, int dither,
  416.                 unsigned int * hddb, unsigned int * hpal, short (*pf)(int),
  417.                 short errormode);
  418.  
  419. int readbmpstream(void * inbuffer, long size, int resolution, int dither,
  420.                   int password, unsigned int * hddb, unsigned int * hpal,
  421.                   short(*pf)(int), short errormode);
  422.  
  423. int rdbmpfiledib(const char *filename, int resolution, int dither, 
  424.                  int password, unsigned int * hddb, unsigned int * hpal,
  425.                  short (*pf)(int), short errormode);
  426.  
  427. int rdbmpstreamdib(void * inbuffer, long size, int resolution, int dither,
  428.                    int password, unsigned int * hddb, unsigned int * hpal,
  429.                    short(*pf)(int), short errormode);
  430.  
  431. These functions take as input a file or memory stream pointing to a BMP image.
  432. It returns pointers to a bitmap Handle and a palette Handle or a DIB Handle.
  433. A return value of one is success,  a negative number is failure and refers
  434. to an error code.  The bitmap returned will be based on the resolution and
  435. dither parameters.  The output will have a bit depth equal to the resolution
  436. no matter what the input resolution is.  The Dither parameter indicates to
  437. use dithering if the color quantitization engine is going to reduce the bit
  438. depth of the input image.  The input BMP image must contain the BITMAPFILEHEADER
  439. part of a BMP at the front before the BITMAPINFOHEADER
  440.  
  441. ______________________________________________________________________________
  442.  
  443. int writebmpfile(const char * filename,  int resolution, int password,
  444.                  unsigned int hddb, unsigned int hpal, short (*pf)(int),
  445.                  short errormode);
  446.  
  447. int writebmpstream(void * inbuffer, long * size,  int resolution, 
  448.                    int password, unsigned int hddb, unsigned int hpal,
  449.                    short (*pf)(int), short errormode);
  450.  
  451. int wrbmpfiledib(const char * filename,  int resolution, int password,
  452.                   unsigned int hdib, short (*pf)(int), short errormode);
  453.  
  454. int wrbmpstreamdib(void * inbuffer, long * size,  int resolution,
  455.                    int password, unsigned int hdib, short (*pf)(int),
  456.                    short errormode);
  457.  
  458. These functions are passed a filename or a pointer to a buffer or size to write a
  459. BMP image to.  The inputs are either HANDLES to a DDB and logical palette or 
  460. a HANDLE to a DIB.  The resolution parameter describes the bit depth of the output
  461. image.  Output size of the file or memory stream is based on the size input
  462. and the value of the resolution parameter.  The input bitmap's bit depth
  463. will be raised or lowered as necessary according to the resolution parameter. 
  464.  
  465. ______________________________________________________________________________
  466.  
  467. int readpngfile(const char *filename, int resolution, int password, int dither,
  468.                 unsigned int * hddb, unsigned int * hpal, short (*pf)(int),
  469.                 short errormode);
  470.  
  471. int readpngstream(void * inbuffer, long size, int resolution, int dither,
  472.                   int password, unsigned int * hddb, unsigned int * hpal,
  473.                   short(*pf)(int), short errormode);
  474.  
  475. int rdpngfiledib(const char *filename, int resolution, int dither, 
  476.                  int password, unsigned int * hddb, unsigned int * hpal,
  477.                  short (*pf)(int), short errormode);
  478.  
  479. int rdpngstreamdib(void * inbuffer, long size, int resolution, int dither,
  480.                    int password, unsigned int * hddb, unsigned int * hpal,
  481.                    short(*pf)(int), short errormode);
  482.  
  483. These functions take as input a file or memory stream pointing to a PNG image.
  484. It returns pointers to a bitmap Handle and a palette Handle or a DIB Handle.
  485. A return value of one is success,  a negative number is failure and refers
  486. to an error code.  The bitmap returned will be based on the resolution and
  487. dither parameters.  The output will have a bit depth equal to the resolution
  488. no matter what the input resolution is.  The Dither parameter indicates to
  489. use dithering if the color quantitization engine is going to reduce the bit
  490. depth of the input image. 
  491.  
  492. ______________________________________________________________________________
  493.  
  494. int writepngfile(const char * filename,  int resolution, int interlaced,
  495.                  int password, unsigned int hddb, unsigned int hpal,
  496.                  short (*pf)(int), short errormode);
  497.  
  498. int writepngstream(void * inbuffer, long * size,  int resolution, int interlaced, 
  499.                    int password, unsigned int hddb, unsigned int hpal,
  500.                    short (*pf)(int), short errormode);
  501.  
  502. int wrpngfiledib(const char * filename,  int resolution, int interlaced, 
  503.                  int password, unsigned int hdib, short (*pf)(int),
  504.                  short errormode);
  505.  
  506. int wrpngstreamdib(void * inbuffer, long * size,  int resolution, int interlaced,
  507.                    int password, unsigned int hdib, short (*pf)(int),
  508.                    short errormode);
  509.  
  510. These functions are passed a filename or a pointer to a buffer or size to write a
  511. PCX image to.  The inputs are either HANDLES to a DDB and logical palette or 
  512. a HANDLE to a DIB.  The resolution parameter describes the bit depth of the output
  513. image.  Output size of the file or memory stream is based on the size input
  514. and the value of the resolution parameter.  The input bitmap's bit depth
  515. will be raised or lowered as necessary according to the resolution parameter. The
  516. interlaced parameter indicated to write an interlaced PNG file when it is one and
  517. a non-interlaced parameter when it is 0.
  518.  
  519. ______________________________________________________________________________
  520.  
  521. int fileinfo(const char * filename, char * filetype, int * width, int * height,
  522.              int * bitspixel, int * planes, int * numcolors, char * compression,
  523.              short errormode);
  524.  
  525. This function takes the filename of an image and returns information about the
  526. image.  This function works with BMP, JPG, GIF, PNG, and PCX images.  It is
  527. not dependent on file extension and will identify if a file is one of the above
  528. image types no matter what the extension is.  If the function cannot
  529. correctly identify a file it will return a negative number indicating and
  530. error code, otherwise a 1.  All of the other parameters are pointer to
  531. variables that will be filled by the function.
  532.  
  533. filetype            This character pointer will contain the type of image
  534.                     contained in the file.
  535.         
  536. width               The width of the image in pixels
  537.  
  538. height            The height of the image in pixels
  539.  
  540. bitspixel        he pixel depth, or bits per pixel, of the image
  541.  
  542. planes            The number of bit planes in the image
  543.  
  544. numcolors        The number of palette entries used by the image.
  545.                     Will be 0 for RGB or true color images.
  546.  
  547. compression         Type of compression used for the image or other useful
  548.                     information.  For JPEG and PNG images this variable will
  549.                     indicate a RGB or Grayscale colorspace type for the image.
  550.  
  551. errormode           0 : do not show errors
  552.                     1 : show errors
  553. ___________________________________________________________________________
  554.  
  555. int streaminfo(void * inbuffer, long size, char * filetype, int * width,
  556.                int * height, int * bitspixel, int * planes, int * numcolors,
  557.                char * compression, short errorcode);
  558.  
  559. This function is similar to the fileinfo function except that is identifies
  560. the type of image that is in the input buffer rather than a file.  It is
  561. recommended that the entire image be in memory when trying to use this function.
  562. While the function may work with a incomplete function because in many cases
  563. it just scans the image header it is not certified to work that way.
  564. ___________________________________________________________________________
  565.  
  566.  
  567. The DLL can also be used with other languages besides C.  There is a Delphi
  568. vcl components available the same DLL.
  569.  
  570. Once you buy ImageLib you will receive a password to access the DLL.
  571. This will eliminate the trial version message.
  572.  
  573. Technical Support and questions:
  574.  
  575. Kevin Adams: compuserve 74742,1444  or   
  576. Internet : 74742,1444@compuserve.com
  577.  
  578.  
  579. Address:
  580.  
  581. SkyLine Tools
  582. Attn: Jan Dekkers
  583. 11956 Riverside Drive 206
  584. North Hollywood CA 91607
  585. Phone 818 766-3900
  586. Fax: 818 766-9027
  587. ________________________________________________________________________________
  588.  
  589. License Agreement
  590.  
  591.  
  592. Rights and Limitations
  593. The software which accompanies this license ("ImageLib") is the property
  594. of SkyLine Tools or its licensers and is protected by copyright law.
  595. By using ImageLib you agree to the terms of this agreement. You may install one
  596. copy of the ImageLib product on a single computer. One copy of ImageLib may be
  597. only used by a single developer at a time.  When ImageLib is being used by
  598. an executable application then there are no licensing fees or royalties
  599. for distribution of the executable and the DLL.  Should any part of ImageLib
  600. be used in a non-compiled application, such as:  a value added VCL, VBX, OCX,
  601. royalties apply.      
  602.  
  603. Limited Warranty
  604. SkyLine Tools warrants that ImageLib will perform substantially in accordance
  605. with the accompanying documentation for a period of (90) days from the date
  606. of receipt.
  607.  
  608. Liabilities 
  609. SkyLine Tools and its licensers entire liability and your exclusive remedy
  610. shall be, at SkyLine Tools option, either return of the price paid,
  611. or repair or replacement of the ImageLib product.
  612.   
  613. Gif and Tiff uses LZW compression which is patented by Unisys. On
  614. CompuServe GO PICS to obtain information about the Unisys patents.
  615. By using ImageLib's GIF Read and Write features you acknowledge that
  616. SkyLine has notified you about the LZW patent and hold SkyLine harmless
  617. from any legal actions.
  618.  
  619. The "JPEG file I/O and compression/decompression" is based in part on the
  620. work of the Independent JPEG Group.
  621.