home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / GFX / Converter / MPIMAGE51.LZX / include / libraries / MPImage.h
Encoding:
C/C++ Source or Header  |  1996-10-10  |  3.6 KB  |  128 lines

  1. #ifndef LIBRARIES_MPIMAGE_H
  2. #define LIBRARIES_MPIMAGE_H
  3.  
  4. /* mark@topic.demon.co.uk */
  5. /* mpaddock@cix.compulink.co.uk */
  6.  
  7. /* $VER: MPImage.h 5.1 (1.10.96)
  8. */
  9.  
  10. #include <exec/types.h>
  11.  
  12. /* Load Image stuff */
  13. struct MPImage {
  14.     struct BitMap *BitMap;
  15.     struct E_EBitMap *EGS_BitMap;
  16.     UBYTE *Red;
  17.     UBYTE *Green;
  18.     UBYTE *Blue;
  19.     UWORD Width;
  20.     UWORD Height;
  21.     Object *Object;
  22.     BOOL GreyScale;
  23.     BOOL Cyber;        // V 4.3 - for later use
  24. };
  25.  
  26. /* Default is to remap to screen palette and return a bitmap in BitMap */
  27. /* Only way to free is to call FreeMPImageBitMap */
  28.  
  29. /* return E_EBitMap rather than BitMap */
  30. /* overrides MPIF_RGB */
  31. #define MPIF_EGS                 (1<<0)
  32.  
  33. /* You are free to zero BitMap/EGS_BitMap before calling FreeMPImageBitMap */
  34. /* You must then call FreeBitMap()/E_DisposeBitMap() yourself */
  35. /* Ignored for MPIF_RGB */
  36. /* If screen supplied then clone is screen depth deep if possible */
  37. #define MPIF_CLONEBITMAP    (1<<1)
  38.  
  39. /* Don't remap to the current screen colors */
  40. /* Ignored for MPIF_EGS/RGB */
  41. /* Returns error if 24 bit input */
  42. #define MPIF_NOREMAP            (1<<2)
  43.  
  44. /* return Red, Green, Blue instead of BitMap */
  45. #define MPIF_RGB                (1<<3)
  46.  
  47. /* return Red, Green, Blue instead of BitMap */
  48. /* If image is greyscale then Red, Green and Blue will be the same */
  49. /* and GreyScale will be TRUE */
  50. #define MPIF_GREY                (1<<4)
  51.  
  52. /* As MPIF_GREY but force the input to be remapped to GreyScale */
  53. #define MPIF_FORCEGREY        (1<<5)
  54.  
  55. /* When remapping to grey use linear (not colour based) mapping */
  56. #define MPIF_LINEARGREY        (1<<6)
  57.  
  58. /* Save Image stuff */
  59. /* CAMG mode - data is modeid */
  60. /* If not supplied, or INVALID_ID supplied then internally generated */
  61. #define MPIS_MODE        (TAG_USER + 1)
  62.  
  63. /* Save Format - data is (char *) */
  64. /* If not supplied or NULL then save BW16 */
  65. #define MPIS_FORMAT    (TAG_USER + 2)
  66. /* 16 colour grey scale */
  67. #define MPI_BW16        "BW16"
  68. /* 256 colour grey scale */
  69. #define MPI_BW256        "BW256"
  70. /* HAM 6 fixed (internal) palette */
  71. #define MPI_HAM6        "HAM6"
  72. /* HAM 8 fixed (internal) palette */
  73. #define MPI_HAM8        "HAM8"
  74. /* 24 bit ILBM */
  75. #define MPI_ILBM24    "ILBM24"
  76. /* P6 (or P5 if all planes are the same) PPM format */
  77. #define MPI_PPM        "PPM"
  78. /* HAM 6 generate best palette */
  79. #define MPI_HAM6P        "HAM6P"
  80. /* HAM 8 generate best palette */
  81. #define MPI_HAM8P        "HAM8P"
  82. /* COLOUR generate palette */
  83. #define MPI_COLOUR    "COLOUR"
  84. /* EHB generate palette */
  85. #define MPI_EHB        "EHB"
  86. /* JPEG (requires env:mpimage/cjpeg to be set e.g. 'cjpeg "%s" "%s"') */
  87. #define MPI_JPEG        "JPEG"
  88. /* PNG (requires env:mpimage/pnmtopng to be set e.g. 'pnmtopng "%s" >"%s"') */
  89. #define MPI_PNG        "PNG"
  90. /* DCTV3 (requires dctv.library) */
  91. #define MPI_DCTV3        "DCTV3"
  92. /* DCTV4 (requires dctv.library) */
  93. #define MPI_DCTV4        "DCTV4"
  94.  
  95. /* Filename of palette to use - data is (char *) */
  96. /* Overrides internal and generated palettes */
  97. /* Can be NULL */
  98. #define MPIS_PALETTE    (TAG_USER + 3)
  99.  
  100. /* Number of colours to generate/use from palette - data is ULONG */
  101. /* Only used for COLOUR */
  102. /* If not supplied defaults to number of colours in palette (if supplied) */
  103. /* otherwise 16 */
  104. /* If > colours in palette then ignored */
  105. /* max 256, min 2 */
  106. #define MPIS_COLOURS    (TAG_USER + 4)
  107.  
  108. /* Use 12 bit colour palette for COLOUR/EHB */
  109. #define MPIS_12BIT    (TAG_USER + 5)
  110.  
  111. /* Mode name data is char *, overridden by MPIS_MODE - invalid names ignored */
  112. #define MPIS_MODENAME    (TAG_USER + 6)
  113.  
  114.  
  115. /* V5.0 beta1 */
  116. /* Linear Mapping for BW16/BW256, data is BOOL */
  117. #define MPIS_LINEAR    (TAG_USER + 7)
  118.  
  119. /* V5.0 beta2 */
  120. /* Palette map for BW16/BW256, data is UBYTE * */
  121. #define MPIS_GREYMAP    (TAG_USER + 8)
  122.  
  123. /* Flags for SetMPImageScreen() */
  124. /* Use progress requesters */
  125. #define MPIF_PROGRESS    1
  126.  
  127. #endif
  128.