il_psd.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //-----------------------------------------------------------------------------
  2. //
  3. // ImageLib Sources
  4. // Copyright (C) 2000-2001 by Denton Woods
  5. // Last modified: 01/23/2001 <--Y2K Compliant! =]
  6. //
  7. // Filename: src-IL/include/il_il_psd.c
  8. //
  9. // Description: Reads from a PhotoShop (.psd) file.
  10. //
  11. //-----------------------------------------------------------------------------
  12. #ifndef PSD_H
  13. #define PSD_H
  14. #include "il_internal.h"
  15. #ifdef _MSC_VER
  16. #pragma pack(push, packed_struct, 1)
  17. #endif
  18. typedef struct PSDHEAD
  19. {
  20. ILubyte Signature[4];
  21. ILushort Version;
  22. ILubyte Reserved[6];
  23. ILushort Channels;
  24. ILuint Height;
  25. ILuint Width;
  26. ILushort Depth;
  27. ILushort Mode;
  28. } IL_PACKSTRUCT PSDHEAD;
  29. #ifdef _MSC_VER
  30. #pragma pack(pop, packed_struct)
  31. #endif
  32. ILushort ChannelNum;
  33. ILboolean iIsValidPsd(void);
  34. ILboolean iCheckPsd(PSDHEAD *Header);
  35. ILboolean iLoadPsdInternal(void);
  36. ILboolean ReadPsd(PSDHEAD *Head);
  37. ILboolean ReadGrey(PSDHEAD *Head);
  38. ILboolean ReadIndexed(PSDHEAD *Head);
  39. ILboolean ReadRGB(PSDHEAD *Head);
  40. ILboolean ReadCMYK(PSDHEAD *Head);
  41. ILuint *GetCompChanLen(PSDHEAD *Head);
  42. ILboolean PsdGetData(PSDHEAD *Head, void *Buffer, ILboolean Compressed);
  43. ILboolean ParseResources(ILuint ResourceSize, ILubyte *Resources);
  44. ILboolean GetSingleChannel(PSDHEAD *Head, ILubyte *Buffer, ILboolean Compressed);
  45. ILboolean iSavePsdInternal(void);
  46. #endif//PSD_H