home *** CD-ROM | disk | FTP | other *** search
- #ifndef LIBRARIES_MPIMAGE_H
- #define LIBRARIES_MPIMAGE_H
-
- /* mark@topic.demon.co.uk */
- /* mpaddock@cix.compulink.co.uk */
-
- /* $VER: MPImage.h 5.1 (1.10.96)
- */
-
- #include <exec/types.h>
-
- /* Load Image stuff */
- struct MPImage {
- struct BitMap *BitMap;
- struct E_EBitMap *EGS_BitMap;
- UBYTE *Red;
- UBYTE *Green;
- UBYTE *Blue;
- UWORD Width;
- UWORD Height;
- Object *Object;
- BOOL GreyScale;
- BOOL Cyber; // V 4.3 - for later use
- };
-
- /* Default is to remap to screen palette and return a bitmap in BitMap */
- /* Only way to free is to call FreeMPImageBitMap */
-
- /* return E_EBitMap rather than BitMap */
- /* overrides MPIF_RGB */
- #define MPIF_EGS (1<<0)
-
- /* You are free to zero BitMap/EGS_BitMap before calling FreeMPImageBitMap */
- /* You must then call FreeBitMap()/E_DisposeBitMap() yourself */
- /* Ignored for MPIF_RGB */
- /* If screen supplied then clone is screen depth deep if possible */
- #define MPIF_CLONEBITMAP (1<<1)
-
- /* Don't remap to the current screen colors */
- /* Ignored for MPIF_EGS/RGB */
- /* Returns error if 24 bit input */
- #define MPIF_NOREMAP (1<<2)
-
- /* return Red, Green, Blue instead of BitMap */
- #define MPIF_RGB (1<<3)
-
- /* return Red, Green, Blue instead of BitMap */
- /* If image is greyscale then Red, Green and Blue will be the same */
- /* and GreyScale will be TRUE */
- #define MPIF_GREY (1<<4)
-
- /* As MPIF_GREY but force the input to be remapped to GreyScale */
- #define MPIF_FORCEGREY (1<<5)
-
- /* When remapping to grey use linear (not colour based) mapping */
- #define MPIF_LINEARGREY (1<<6)
-
- /* Save Image stuff */
- /* CAMG mode - data is modeid */
- /* If not supplied, or INVALID_ID supplied then internally generated */
- #define MPIS_MODE (TAG_USER + 1)
-
- /* Save Format - data is (char *) */
- /* If not supplied or NULL then save BW16 */
- #define MPIS_FORMAT (TAG_USER + 2)
- /* 16 colour grey scale */
- #define MPI_BW16 "BW16"
- /* 256 colour grey scale */
- #define MPI_BW256 "BW256"
- /* HAM 6 fixed (internal) palette */
- #define MPI_HAM6 "HAM6"
- /* HAM 8 fixed (internal) palette */
- #define MPI_HAM8 "HAM8"
- /* 24 bit ILBM */
- #define MPI_ILBM24 "ILBM24"
- /* P6 (or P5 if all planes are the same) PPM format */
- #define MPI_PPM "PPM"
- /* HAM 6 generate best palette */
- #define MPI_HAM6P "HAM6P"
- /* HAM 8 generate best palette */
- #define MPI_HAM8P "HAM8P"
- /* COLOUR generate palette */
- #define MPI_COLOUR "COLOUR"
- /* EHB generate palette */
- #define MPI_EHB "EHB"
- /* JPEG (requires env:mpimage/cjpeg to be set e.g. 'cjpeg "%s" "%s"') */
- #define MPI_JPEG "JPEG"
- /* PNG (requires env:mpimage/pnmtopng to be set e.g. 'pnmtopng "%s" >"%s"') */
- #define MPI_PNG "PNG"
- /* DCTV3 (requires dctv.library) */
- #define MPI_DCTV3 "DCTV3"
- /* DCTV4 (requires dctv.library) */
- #define MPI_DCTV4 "DCTV4"
-
- /* Filename of palette to use - data is (char *) */
- /* Overrides internal and generated palettes */
- /* Can be NULL */
- #define MPIS_PALETTE (TAG_USER + 3)
-
- /* Number of colours to generate/use from palette - data is ULONG */
- /* Only used for COLOUR */
- /* If not supplied defaults to number of colours in palette (if supplied) */
- /* otherwise 16 */
- /* If > colours in palette then ignored */
- /* max 256, min 2 */
- #define MPIS_COLOURS (TAG_USER + 4)
-
- /* Use 12 bit colour palette for COLOUR/EHB */
- #define MPIS_12BIT (TAG_USER + 5)
-
- /* Mode name data is char *, overridden by MPIS_MODE - invalid names ignored */
- #define MPIS_MODENAME (TAG_USER + 6)
-
-
- /* V5.0 beta1 */
- /* Linear Mapping for BW16/BW256, data is BOOL */
- #define MPIS_LINEAR (TAG_USER + 7)
-
- /* V5.0 beta2 */
- /* Palette map for BW16/BW256, data is UBYTE * */
- #define MPIS_GREYMAP (TAG_USER + 8)
-
- /* Flags for SetMPImageScreen() */
- /* Use progress requesters */
- #define MPIF_PROGRESS 1
-
- #endif
-