diff options
author | Pixel <pixel@nobis-crew.org> | 2009-11-04 11:56:41 -0800 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2009-11-04 11:59:33 -0800 |
commit | d577d991b97ae2b5ee1af23641bcffc3f83af5b2 (patch) | |
tree | 590639d50205d1bcfaff2a7d2dc6ebf3f373c7ed /im/include/im_format_all.h |
Initial import. Contains the im, cd and iup librairies, and a "working" Makefile for them under linux.
Diffstat (limited to 'im/include/im_format_all.h')
-rwxr-xr-x | im/include/im_format_all.h | 360 |
1 files changed, 360 insertions, 0 deletions
diff --git a/im/include/im_format_all.h b/im/include/im_format_all.h new file mode 100755 index 0000000..8ebe938 --- /dev/null +++ b/im/include/im_format_all.h @@ -0,0 +1,360 @@ +/** \file + * \brief All the Internal File Formats. + * They are all automatically registered by the library. + * The signatures are in C, but the functions are C++. + * Header for internal use only. + * + * See Copyright Notice in im_lib.h + */ + +#ifndef __IM_FORMAT_ALL_H +#define __IM_FORMAT_ALL_H + +#if defined(__cplusplus) +extern "C" { +#endif + +/** \defgroup gif GIF - Graphics Interchange Format + * \section Description + * + * \par + * Copyright (c) 1987,1988,1989,1990 CompuServe Incorporated. \n + * GIF is a Service Mark property of CompuServe Incorporated. \n + * Graphics Interchange Format Programming Reference, 1990. \n + * LZW Copyright Unisys. + * \par + * Patial Internal Implementation. \n + * Decoding and encoding code were extracted from GIFLib 1.0. \n + * Copyright (c) 1989 Gershon Elber. + * + * \section Features + * +\verbatim + Data Types: Byte + Color Spaces: MAP only, (Gray and Binary saved as MAP) + Compressions: + LZW - Lempel-Ziv & Welch [default] + Can have more than one image. + No alpha channel. + Internally the lines are arranged from top down to bottom. + + Attributes: + ScreenHeight, ScreenWidth IM_USHORT (1) screen size [default to the first image size] + Interlaced IM_INT (1 | 0) default 0 + Description (string) + TransparencyIndex IM_BYTE (1) + XScreen, YScreen IM_USHORT (1) screen position + UserInput IM_BYTE (1) [1, 0] + Disposal (string) [UNDEF, LEAVE, RBACK, RPREV] + Delay IM_USHORT (1) [time to wait betweed frames in 1/100 of a second] + Iterations IM_USHORT (1) (NETSCAPE2.0 Application Extension) [The number of times to repeat the animation. 0 means to repeat forever. ] + + Comments: + Attributes after the last image are ignored. + Reads GIF87 and GIF89, but writes GIF89 always. + Ignored attributes: Background Color Index, Pixel Aspect Ratio, + Plain Text Extensions, Application Extensions... +\endverbatim + * \ingroup format */ +void imFormatRegisterGIF(void); + +/** \defgroup bmp BMP - Windows Device Independent Bitmap + * \section Description + * + * \par + * Windows Copyright Microsoft Corporation. + * \par + * Internal Implementation. + * + * \section Features + * +\verbatim + Data Types: Byte + Color Spaces: RGB, MAP and Binary (Gray saved as MAP) + Compressions: + NONE - no compression [default] + RLE - Run Lenght Encoding (only for MAP and Gray) + Only one image. + Can have an alpha channel (only for RGB) + Internally the components are always packed. + Lines arranged from top down to bottom or bottom up to top. But are saved always as bottom up. + + Attributes: + ResolutionUnit (string) ["DPC", "DPI"] + XResolution, YResolution IM_FLOAT (1) + + Comments: + Reads OS2 1.x and Windows 3, but writes Windows 3 always. + Version 4 and 5 BMPs are not supported. +\endverbatim + * \ingroup format */ +void imFormatRegisterBMP(void); + +/** \defgroup ras RAS - Sun Raster File + * \section Description + * + * \par + * Copyright Sun Corporation. + * \par + * Internal Implementation. + * + * \section Features + * +\verbatim + Data Types: Byte + Color Spaces: Gray, RGB, MAP and Binary + Compressions: + NONE - no compression [default] + RLE - Run Lenght Encoding + Only one image. + Can have an alpha channel (only for IM_RGB) + Internally the components are always packed. + Internally the lines are arranged from top down to bottom. + + Attributes: + none +\endverbatim + * \ingroup format */ +void imFormatRegisterRAS(void); + +/** \defgroup led LED - IUP image in LED + * \section Description + * + * \par + * Copyright Tecgraf/PUC-Rio and PETROBRAS/CENPES. + * \par + * Internal Implementation. + * + * \section Features + * +\verbatim + Data Types: Byte + Color Spaces: MAP only (Gray and Binary saved as MAP) + Compressions: + NONE - no compression [default] + Only one image. + No alpha channel. + Internally the lines are arranged from top down to bottom. + + Attributes: + none + + Comments: + LED file must start with "LEDImage = IMAGE[". +\endverbatim + * \ingroup format */ +void imFormatRegisterLED(void); + +/** \defgroup sgi SGI - Silicon Graphics Image File Format + * \section Description + * + * \par + * SGI is a trademark of Silicon Graphics, Inc. + * \par + * Internal Implementation. + * + * \section Features + * +\verbatim + Data Types: Byte and UShort + Color Spaces: Gray and RGB (Binary saved as Gray, MAP with fixed palette when reading only) + Compressions: + NONE - no compression [default] + RLE - Run Lenght Encoding + Only one image. + Can have an alpha channel (only for IM_RGB) + Internally the components are always packed. + Internally the lines are arranged from bottom up to top. + + Attributes: + Description (string) +\endverbatim + * \ingroup format */ +void imFormatRegisterSGI(void); + +/** \defgroup pcx PCX - ZSoft Picture + * \section Description + * + * \par + * Copyright ZSoft Corporation. \n + * ZSoft (1988) PCX Technical Reference Manual. + * \par + * Internal Implementation. + * + * \section Features + * +\verbatim + Data Types: Byte + Color Spaces: RGB, MAP and Binary (Gray saved as MAP) + Compressions: + NONE - no compression + RLE - Run Lenght Encoding [default - since uncompressed PCX is not well supported] + Only one image. + No alpha channel. + Internally the components are always packed. + Internally the lines are arranged from top down to bottom. + + Attributes: + ResolutionUnit (string) ["DPC", "DPI"] + XResolution, YResolution IM_FLOAT (1) + XScreen, YScreen IM_USHORT (1) screen position + + Comments: + Reads Versions 0-5, but writes Version 5 always. +\endverbatim + * \ingroup format */ +void imFormatRegisterPCX(void); + +/** \defgroup tga TGA - Truevision Graphics Adapter File + * \section Description + * + * \par + * Truevision TGA File Format Specification Version 2.0 \n + * Technical Manual Version 2.2 January, 1991 \n + * Copyright 1989, 1990, 1991 Truevision, Inc. + * \par + * Internal Implementation. + * + * \section Features + * +\verbatim + Supports 8 bits per component only. Data type is always Byte. + Color Spaces: Gray, RGB and MAP (Binary saved as Gray) + Compressions: + NONE - no compression [default] + RLE - Run Lenght Encoding + Only one image. + No alpha channel. + Internally the components are always packed. + Internally the lines are arranged from bottom up to top or from top down to bottom. + + Attributes: + XScreen, YScreen IM_USHORT (1) screen position + Title, Author, Description, JobName, Software (string) + SoftwareVersion (read only) (string) + DateTimeModified (string) [when writing uses the current system time] + Gamma IM_FLOAT (1) +\endverbatim + * \ingroup format */ +void imFormatRegisterTGA(void); + +/** \defgroup pnm PNM - Netpbm Portable Image Map + * \section Description + * + * \par + * PNM formats Copyright Jef Poskanzer + * \par + * Internal Implementation. + * + * \section Features + * +\verbatim + Data Types: Byte and UShort + Color Spaces: Gray, RGB and Binary + Compressions: + NONE - no compression [default] + ASCII (textual data) + Can have more than one image, but sequencial access only. + No alpha channel. + Internally the components are always packed. + Internally the lines are arranged from top down to bottom. + + Attributes: + Description (string) + + Comments: + In fact ASCII is an expansion, not a compression, because the file will be larger than binary data. +\endverbatim + * \ingroup format */ +void imFormatRegisterPNM(void); + +/** \defgroup ico ICO - Windows Icon + * \section Description + * + * \par + * Windows Copyright Microsoft Corporation. + * \par + * Internal Implementation. + * + * \section Features + * +\verbatim + Data Types: Byte + Color Spaces: RGB, MAP and Binary (Gray saved as MAP) + Compressions: + NONE - no compression [default] + Can have more than one image. But writing is limited to 5 images, + and all images must have different sizes and bpp. + Can have an alpha channel (only for RGB) + Internally the components are always packed. + Internally the lines are arranged from bottom up to top. + + Attributes: + TransparencyIndex IM_BYTE (1) + + Comments: + If the user specifies an alpha channel, the AND mask is loaded as alpha if + the file color mode does not contain the IM_ALPHA flag. + For MAP imagens, if the user does not specifies an alpha channel + the TransparencyIndex is used to initialize the AND mask when writing, + and if the user does specifies an alpha channel + the most repeated index with transparency will be the transparent index. + Although any size and common bpp can be used is recomended to use the typical configurations: + 16x16, 32x32, 48x48, 64x64 or 96x96 + 2 colors, 16 colors, 256 colors, 24bpp or 32bpp +\endverbatim + * \ingroup format */ +void imFormatRegisterICO(void); + +/** \defgroup krn KRN - IM Kernel File Format + * \section Description + * + * \par + * Textual format to provied a simple way to create kernel convolution images. + * \par + * Internal Implementation. + * + * \section Features + * +\verbatim + Data Types: Byte, Int + Color Spaces: Gray + Compressions: + NONE - no compression [default] + Only one image. + No alpha channel. + Internally the lines are arranged from top down to bottom. + + Attributes: + Description (string) + + Comments: + The format is very simple, inspired by PNM. + It was developed because PNM does not have support for INT and FLOAT. + Remeber that usually convolution operations use kernel size an odd number. + + Format Model: + IMKERNEL + Description up to 512 characters + width height + type (0 - IM_INT, 1 - IM_FLOAT) + data... + + Example: + IMKERNEL + Gradian + 3 3 + 0 + 0 -1 0 + 0 1 0 + 0 0 0 +\endverbatim + * \ingroup format */ +void imFormatRegisterKRN(void); + + +#if defined(__cplusplus) +} +#endif + +#endif |