il_pcx.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. //-----------------------------------------------------------------------------
  2. //
  3. // ImageLib Sources
  4. // Copyright (C) 2000-2002 by Denton Woods
  5. // Last modified: 05/25/2001 <--Y2K Compliant! =]
  6. //
  7. // Filename: src-IL/include/il_pcx.h
  8. //
  9. // Description: Reads and writes from/to a .pcx file.
  10. //
  11. //-----------------------------------------------------------------------------
  12. #ifndef PCX_H
  13. #define PCX_H
  14. #include "il_internal.h"
  15. #ifdef _WIN32
  16. #pragma pack(push, packed_struct, 1)
  17. #endif
  18. typedef struct PCXHEAD
  19. {
  20. ILubyte Manufacturer;
  21. ILubyte Version;
  22. ILubyte Encoding;
  23. ILubyte Bpp;
  24. ILushort Xmin, Ymin, Xmax, Ymax;
  25. ILushort HDpi;
  26. ILushort VDpi;
  27. ILubyte ColMap[48];
  28. ILubyte Reserved;
  29. ILubyte NumPlanes;
  30. ILushort Bps;
  31. ILushort PaletteInfo;
  32. ILushort HScreenSize;
  33. ILushort VScreenSize;
  34. ILubyte Filler[54];
  35. } IL_PACKSTRUCT PCXHEAD;
  36. #ifdef _WIN32
  37. #pragma pack(pop, packed_struct)
  38. #endif
  39. // For checking and reading
  40. ILboolean iIsValidPcx(void);
  41. ILboolean iCheckPcx(PCXHEAD *Header);
  42. ILboolean iLoadPcxInternal(void);
  43. ILboolean iSavePcxInternal(void);
  44. ILboolean iUncompressPcx(PCXHEAD *Header);
  45. ILboolean iUncompressSmall(PCXHEAD *Header);
  46. // For writing
  47. ILuint encput(ILubyte byt, ILubyte cnt);
  48. ILuint encLine(ILubyte *inBuff, ILint inLen, ILubyte Stride);
  49. #endif//PCX_H