home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / windows / c / itool3 / library / image_ls.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-21  |  1.9 KB  |  53 lines

  1. #ifndef IMAGE_LS
  2. #define IMAGE_LS
  3. #include "..\library\liberror.h"  // all error codes
  4.  
  5. #define         MAX_FILE_NAME           127
  6.  
  7. #define ERR_CODE        WORD
  8.  
  9. // LIST of error codes of the ERR_CODE type
  10. #define ERR_OK                          0x0000  // there is no error
  11. #define ERR                                     0x8003
  12.  
  13. /* File types... */
  14.     #define  BMP_FILE       1
  15.     #define  GIF_FILE       2
  16.     #define  PCX_FILE       3
  17.     #define  TGA_FILE       4
  18.     #define  TIF_FILE       5
  19.     #define  FLI_FILE       6
  20.     #define  FLC_FILE       7
  21.     #define  JPG_FILE       8
  22.  
  23.     #define ERR_CODE        WORD
  24.  
  25. // LIST of error codes of the ERR_CODE type
  26.     #define ERR_OK          0x0000  // there is no error
  27.     #define ERR                     0x8003
  28.     #define         ERR_RETURN      WORD
  29.      #define    S_TYPE          FAR PASCAL
  30.  
  31.     #define  IS_ANIMATION_TYPE(x) (x==FLI_FILE || x==FLC_FILE)
  32.  
  33. /* FILEINFO structure is used with all load and save functions */
  34.  
  35. typedef struct {
  36.     char szFileName[MAX_FILE_NAME+1];  //Name of the file
  37.     WORD wFileType;                         //File type (one of the following)
  38.     WORD wCompression;                              //0=no compression, 1=compression
  39.                             //With JPEG file this parametar defines quality (1..100)
  40.     WORD nFrames;                      //Number of frames (in animation file only - wFileType is FLI_FILE or FLC_FILE)
  41. } FILEINFO, FAR *LPFILEINFO;
  42.  
  43. ERR_RETURN S_TYPE ImageLoad(LPFILEINFO lpFileInfo, LPFRAME lpFrame, short nFrame);
  44.  
  45. ERR_RETURN S_TYPE ImageSave(LPFILEINFO lpFileInfo, LPFRAME lpFrame);
  46.  
  47. ERR_RETURN S_TYPE FLXGetInfo(LPFILEINFO lpFileInfo, LPFRAME lpFrame);
  48. ERR_RETURN S_TYPE FLXLoad(LPFILEINFO lpFileInfo, LPFRAME FAR* lpFrame, short nStartFrame,short nEndFrame);
  49. ERR_RETURN S_TYPE FLXSave(LPFILEINFO lpFileInfo, LPFRAME FAR* lpFrame, short nFrames);
  50. ERR_RETURN S_TYPE FLXAppend(LPFILEINFO lpFileInfo, LPFRAME FAR* lpFrame, short nFrames);
  51.  
  52. #endif
  53.