#ifndef IMAGEGENERIC_H
#define IMAGEGENERIC_H

/*
**	$VER: imagegeneric.h 1.0 (30.6.2000)
**
**	Generic image definitions and formats.
**
**	© Paul Huxham
*/

#ifndef EXEC_TYPES_H
#include "exec/types.h"
#endif

#ifndef DOS_DOS_H
#include <dos/dos.h>
#endif

#ifndef UTILITY_TAGITEM_H
#include <utility/tagitem.h>
#endif

/*========================================================================*/
/* Colour spaces */
enum
{
	IMCS_UNKNOWN = 0,
	IMCS_RGB, // RGB triplets
	IMCS_GREY, // Greyscale
	IMCS_ARGB, // ARGB quads
	IMCS_RGBA, // ARGB quads
};

/*========================================================================*/
/* Filetypes */
enum
{
	IMGF_UNKNOWN = 0, IMGF_ANIM, IMGF_BMP, IMGF_FAXX, IMGF_GIF, IMGF_ICON, IMGF_ILBM, IMGF_IFF24, IMGF_JPEG,
	IMGF_MACPAINT, IMGF_PBM, IMGF_PCD, IMGF_PCX, IMGF_PICT, IMGF_PNG, IMGF_POSTSCRIPT, IMGF_TARGA,
	IMGF_TIFF, IMGF_YCRCB, IMGF_YUVN, IMGF_SCREEN, IMGF_MPEG, IMGF_IMG, IMGF_PNM,
};

/*========================================================================*/
/* Description - Format (bits/flags) */
#define IMFB_PLANAR 0
#define IMFB_CHUNKY 1
#define IMFB_HAM6 2
#define IMFB_HALFBRITE 3
#define IMFB_HAM8 4
#define IMFB_24BIT 5
#define IMFB_PALETTE 6
#define IMFB_GREY 7

#define IMFF_PLANAR (1L << IMFB_PLANAR) /* Image data is planar */
#define IMFF_CHUNKY (1L << IMFB_CHUNKY) /* Image data is chunky */
#define IMFF_HAM6 (1L << IMFB_HAM6) /* Image data is HAM6 */
#define IMFF_HALFBRITE (1L << IMFB_HALFBRITE) /* Image data is HALFBRITE */
#define IMFF_HAM8 (1L << IMFB_HAM8) /* Image data is HAM8 */
#define IMFF_24BIT (1L << IMFB_24BIT) /* Image data is 24bit */
#define IMFF_PALETTE (1L << IMFB_PALETTE) /* Image data is palette mapped */
#define IMFF_GREY (1L << IMFB_GREY) /* Image data is greyscale */

/* Flags/Depth example:

	NOTE: for planar images, the depth is the number of planes, not the
				number of colours.

	IMFF_PLANAR and 2 == 4 colour planar image

	IMFF_PLANAR | IMFF_HAM8 and 8 == 256 colour planar image in HAM8 mode.

	IMFF_CHUNKY and 24 == 24 Bit RGB pixels.

	IMFF_CHUNKY and 18 == 18 Bit RGB pixels.

	IMFF_PLANAR and 24 == 24 Bit planar (IFF24).

	If IMFF_PALETTE is set, then the image is palette mapped, eg gif

	If IMFF_GREY is set, the the image is greyscale and not colour.
*/
#endif /* IMAGEGENERIC_H */
