im_format_all.h

Go to the documentation of this file.
00001 /** \file
00002  * \brief All the Internal File Formats.
00003  * They are all automatically registered by the library.
00004  * The signatures are in C, but the functions are C++.
00005  * Header for internal use only.
00006  *
00007  * See Copyright Notice in im_lib.h
00008  */
00009 
00010 #ifndef __IM_FORMAT_ALL_H
00011 #define __IM_FORMAT_ALL_H
00012 
00013 #if     defined(__cplusplus)
00014 extern "C" {
00015 #endif
00016 
00017 /** \defgroup tiff TIFF - Tagged Image File Format
00018  * \section Description
00019  *
00020  * \par
00021  * Copyright (c) 1986-1988, 1992 by Adobe Systems Incorporated. \n
00022  * Originally created by a group of companies,
00023  * the Aldus Corporation keeped the copyright until Aldus was aquired by Adobe. \n
00024  * TIFF Revision 6.0 Final — June 3, 1992 \n
00025  * http://www.adobe.com/Support/TechNotes.html
00026  * \par
00027  * Access to the TIFF file format uses libTIFF version 3.9.0 \n
00028  * http://www.remotesensing.org/libtiff/                     \n
00029  * Copyright (c) 1988-1997 Sam Leffler                      \n
00030  * Copyright (c) 1991-1997 Silicon Graphics, Inc.           \n
00031  *
00032  * \section Features
00033  *
00034 \verbatim
00035     Data Types: <all>
00036     Color Spaces: Gray, RGB, CMYK, YCbCr, Lab, XYZ, Map and Binary.
00037     Compressions:
00038       NONE - no compression  [default for IEEE Floating Point Data]
00039       CCITTRLE - CCITT modified Huffman RLE (binary only) [default for Binary]
00040       CCITTFAX3 - CCITT Group 3 fax         (binary only)
00041       CCITTFAX4 - CCITT Group 4 fax         (binary only)
00042       LZW - Lempel-Ziv & Welch  [default]
00043       JPEG - ISO JPEG    [default for YCBCR]
00044       NEXT - NeXT 2-bit RLE (2 bpp only)
00045       CCITTRLEW - CCITT modified Huffman RLE with word alignment (binary only)
00046       RLE - Packbits (Macintosh RLE) [default for MAP]
00047       THUNDERSCAN - ThunderScan 4-bit RLE (only for 2 or 4 bpp)
00048       PIXARLOG - Pixar companded 11-bit ZIP (only byte, ushort and float)
00049       DEFLATE - LZ77 variation (ZIP)
00050       ADOBE_DEFLATE - Adobe LZ77 variation
00051       SGILOG - SGI Log Luminance RLE for L and Luv (only byte, ushort and float) [default for XYZ]
00052       SGILOG24 - SGI Log 24-bit packed for Luv (only byte, ushort and float)
00053     Can have more than one image.
00054     Can have an alpha channel.
00055     Components can be packed or not.
00056     Lines arranged from top down to bottom or bottom up to top.
00057     Handle(1) returns a TIFF* libTIFF structure.
00058 
00059     Attributes:
00060       Photometric IM_USHORT (1) (when writing this will complement the color_mode information, for Mask, MinIsWhite, ITULab and ICCLab)
00061       ExtraSampleInfo IM_USHORT (1) (description of alpha channel: 0- uknown, 1- pre-multiplied, 2-normal)
00062       JPEGQuality IM_INT (1) [0-100, default 75] (write only)
00063       ZIPQuality IM_INT (1) [1-9, default 6] (write only)
00064       ResolutionUnit (string) ["DPC", "DPI"]
00065       XResolution, YResolution IM_FLOAT (1)
00066       Description, Author, Copyright, DateTime, DocumentName,
00067       PageName, TargetPrinter, Make, Model, Software, HostComputer (string)
00068       InkNames (strings separated by '0's)
00069       InkSet IM_USHORT (1)
00070       NumberOfInks IM_USHORT (1)
00071       DotRange IM_USHORT (2)
00072       TransferFunction0, TransferFunction1, TransferFunction3 IM_USHORT [gray=0, rgb=012]
00073       ReferenceBlackWhite IMFLOAT (6)
00074       WhitePoint IMFLOAT (2)
00075       PrimaryChromaticities  IMFLOAT (6)
00076       YCbCrCoefficients IM_FLOAT (3)
00077       YCbCrSubSampling IM_USHORT (2)
00078       YCbCrPositioning IM_USHORT (1)
00079       PageNumber IM_USHORT (2)
00080       StoNits IM_FLOAT (1)
00081       XPosition, YPosition IM_FLOAT (1)
00082       SMinSampleValue, SMaxSampleValue IM_FLOAT (1)
00083       HalftoneHints IM_USHORT (2)
00084       SubfileType IM_INT (1)
00085       ICCProfile IM_BYTE (N)
00086       MultiBandCount IM_USHORT (1)    [Number of bands in a multiband gray image.]
00087       MultiBandSelect IM_USHORT (1)   [Band number to read one band of a multiband gray image. Must be set before reading image info.]
00088       and other TIFF tags as they are described in the TIFF documentation.
00089       GeoTIFF tags:
00090         GeoTiePoints, GeoTransMatrix, IntergraphMatrix, GeoPixelScale, GeoDoubleParams IM_FLOAT (N)
00091         GeoASCIIParams (string)
00092       Read-only support for EXIF tags as they are described in the EXIF 2.2 documentation. See http://www.exif.org/
00093       DNG tags as they are described in the DNG documentation. See http://www.adobe.com/br/products/dng/
00094         Tags BlackLevel, DefaultCropOrigin and DefaultCropSize are incorrectly interpreted by libTIFF so they are ignored.
00095         Raw image is loaded in place of the thumbnail image in the main IFD.
00096         SubIFDCount IM_USHORT (1)    [Number of subifds of the current image.]
00097         SubIFDSelect IM_USHORT (1)   [Subifd number to be read. Must be set before reading image info.]
00098       (other attributes can be obtained by using libTIFF directly using the Handle(1) function)
00099 
00100     Comments:
00101       LogLuv is in fact Y'+CIE(u,v), so we choose to always convert it to XYZ.
00102       SubIFD is handled only for DNG.
00103       Since LZW patent expired, LZW compression is enabled. LZW Copyright Unisys.
00104       libGeoTIFF can be used without XTIFF initialization. Use Handle(1) to obtain a TIFF*.
00105 
00106     Changes:
00107       "tiff_jpeg.c" - commented "downsampled_output = TRUE" in 2 places.
00108       New file "tif_config.h" to match our needs.
00109       New file "tiff_binfile.c" that implement I/O rotines using imBinFile.
00110 \endverbatim
00111  * \ingroup format */
00112 void imFormatRegisterTIFF(void);
00113 
00114 /** \defgroup jpeg JPEG - JPEG File Interchange Format
00115  * \section Description
00116  *
00117  * \par
00118  * ISO/IEC 10918 (1994, 1995, 1997, 1999)\n
00119  * http://www.jpeg.org/
00120  * \par
00121  * Access to the JPEG file format uses libJPEG version 7. \n
00122  * http://www.ijg.org                                      \n
00123  * Copyright (C) 1994-2009, Thomas G. Lane, Guido Vollbeding  \n
00124  *   from the Independent JPEG Group.
00125  * \par
00126  * Access to the EXIF attributes uses libEXIF version 0.6.17. \n
00127  * http://sourceforge.net/projects/libexif                    \n
00128  * Copyright (C) 2001-2003, Lutz Müller
00129  *
00130  * \section Features
00131  *
00132 \verbatim
00133     Data Types: Byte
00134     Color Spaces: Gray, RGB, CMYK and YCbCr (Binary Saved as Gray)
00135     Compressions:
00136       JPEG - ISO JPEG  [default]
00137     Only one image.
00138     No alpha channel.
00139     Internally the components are always packed.
00140     Internally the lines are arranged from top down to bottom.
00141     Handle(1) returns jpeg_decompress_struct* when reading, and
00142                       jpeg_compress_struct* when writing (libJPEG structures).
00143 
00144     Attributes:
00145       AutoYCbCr IM_INT (1) (controls YCbCr auto conversion) default 1
00146       JPEGQuality IM_INT (1) [0-100, default 75] (write only)
00147       ResolutionUnit (string) ["DPC", "DPI"]
00148       XResolution, YResolution IM_FLOAT (1)
00149       Interlaced (same as Progressive) IM_INT (1 | 0) default 0
00150       Description (string)
00151       (lots of Exif tags)
00152 
00153     Changes to libJPEG:
00154       jdatadst.c - fflush and ferror replaced by macros JFFLUSH and JFERROR.
00155       jinclude.h - standard JFFLUSH and JFERROR definitions, and new macro HAVE_JFIO.
00156       jdhuf.c - added support for OJPEG_SUPPORT in libTIFF.
00157       new file created: jconfig.h
00158 
00159     Changes to libEXIF:
00160       new files config.h and _stdint.h
00161       changed "exif-tag.c" to add new function
00162       changed "exif-entry.c" to improve exif_entry_initialize
00163 
00164     Comments:
00165       Other APPx markers are ignored.
00166       No thumbnail support.
00167       RGB images are automatically converted to YCbCr when saved.
00168       Also YcbCr are converted to RGB when loaded. Use AutoYCbCr=0 to disable this behavior.
00169 \endverbatim
00170  * \ingroup format */
00171 void imFormatRegisterJPEG(void);
00172 
00173 /** \defgroup png PNG - Portable Network Graphic Format
00174  * \section Description
00175  *
00176  * \par
00177  * Access to the PNG file format uses libPNG version 1.2.39. \n
00178  * http://www.libpng.org                                    \n
00179  * Copyright (C) 1998-2009 Glenn Randers-Pehrson
00180  *
00181  * \section Features
00182  *
00183 \verbatim
00184     Data Types: Byte and UShort
00185     Color Spaces: Gray, RGB, MAP and Binary
00186     Compressions:
00187       DEFLATE - LZ77 variation (ZIP) [default]
00188     Only one image.
00189     Can have an alpha channel.
00190     Internally the components are always packed.
00191     Internally the lines are arranged from top down to bottom.
00192     Handle(1) returns png_structp libPNG structure.
00193 
00194     Attributes:
00195       ZIPQuality IM_INT (1) [1-9, default 6] (write only)
00196       ResolutionUnit (string) ["DPC", "DPI"]
00197       XResolution, YResolution IM_FLOAT (1)
00198       Interlaced (same as Progressive) IM_INT (1 | 0) default 0
00199       Gamma IM_FLOAT (1)
00200       WhitePoint IMFLOAT (2)
00201       PrimaryChromaticities  IMFLOAT (6)
00202       XPosition, YPosition IM_FLOAT (1)
00203       sRGBIntent IM_INT (1) [0: Perceptual, 1: Relative colorimetric, 2: Saturation, 3: Absolute colorimetric]
00204       TransparencyMap IM_BYTE (N) (for MAP images is the alpha value of the corresponding palette index)
00205       TransparencyIndex IM_BYTE (1) (for MAP images is the first index that has minimum alpha in TransparencyMap, for GRAY images is the index that it is fully transparent)
00206       TransparencyColor IM_BYTE (3) (for RGB images is the color that is full transparent)
00207       CalibrationName, CalibrationUnits (string)
00208       CalibrationLimits IM_INT (2)
00209       CalibrationEquation IM_BYTE (1) [0-Linear,1-Exponential,2-Arbitrary,3-HyperbolicSine)]
00210       CalibrationParam (string) [params separated by '\\n']
00211       Title, Author, Description, Copyright, DateTime (string)
00212       Software, Disclaimer, Warning, Source, Comment, ...       (string)
00213       DateTimeModified (string) [when writing uses the current system time]
00214       ICCProfile IM_BYTE (N)
00215       ScaleUnit (string) ["meters", "radians"]
00216       XScale, YScale IM_FLOAT (1)
00217 
00218     Comments:
00219       When saving PNG image with TransparencyIndex or TransparencyMap, TransparencyMap has precedence, so set it to NULL if you changed TransparencyIndex.
00220       Attributes after the image are ignored.
00221       Define PNG_NO_CONSOLE_IO to avoid printfs. We also define PNG_TIME_RFC1123_SUPPORTED.
00222       Added the following files to the makefile to optimize the library:
00223       pngvcrd.c  - PNG_USE_PNGVCRD
00224                    For Intel x86 CPU and Microsoft Visual C++ compiler
00225       pnggccrd.c - PNG_USE_PNGGCCRD
00226                    For Intel x86 CPU (Pentium-MMX or later) and GNU C compiler.
00227 \endverbatim
00228  * \ingroup format */
00229 void imFormatRegisterPNG(void);
00230 
00231 /** \defgroup gif GIF - Graphics Interchange Format
00232  * \section Description
00233  *
00234  * \par
00235  * Copyright (c) 1987,1988,1989,1990 CompuServe Incorporated. \n
00236  * GIF is a Service Mark property of CompuServe Incorporated. \n
00237  * Graphics Interchange Format Programming Reference, 1990. \n
00238  * LZW Copyright Unisys.
00239  * \par
00240  * Patial Internal Implementation. \n
00241  * Decoding and encoding code were extracted from GIFLib 1.0. \n
00242  * Copyright (c) 1989 Gershon Elber.
00243  *
00244  * \section Features
00245  *
00246 \verbatim
00247     Data Types: Byte
00248     Color Spaces: MAP only, (Gray and Binary saved as MAP)
00249     Compressions:
00250       LZW - Lempel-Ziv & Welch      [default]
00251     Can have more than one image.
00252     No alpha channel.
00253     Internally the lines are arranged from top down to bottom.
00254 
00255     Attributes:
00256       ScreenHeight, ScreenWidth IM_USHORT (1) screen size [default to the first image size]
00257       Interlaced IM_INT (1 | 0) default 0
00258       Description (string)
00259       TransparencyIndex IM_BYTE (1)
00260       XScreen, YScreen IM_USHORT (1) screen position
00261       UserInput IM_BYTE (1) [1, 0]
00262       Disposal (string) [UNDEF, LEAVE, RBACK, RPREV]
00263       Delay IM_USHORT (1) [time to wait betweed frames in 1/100 of a second]
00264       Iterations IM_USHORT (1) (NETSCAPE2.0 Application Extension) [The number of times to repeat the animation. 0 means to repeat forever. ]
00265 
00266     Comments:
00267       Attributes after the last image are ignored.
00268       Reads GIF87 and GIF89, but writes GIF89 always.
00269       Ignored attributes: Background Color Index, Pixel Aspect Ratio,
00270                           Plain Text Extensions, Application Extensions...
00271 \endverbatim
00272  * \ingroup format */
00273 void imFormatRegisterGIF(void);
00274 
00275 /** \defgroup bmp BMP - Windows Device Independent Bitmap
00276  * \section Description
00277  *
00278  * \par
00279  * Windows Copyright Microsoft Corporation.
00280  * \par
00281  * Internal Implementation.
00282  *
00283  * \section Features
00284  *
00285 \verbatim
00286     Data Types: Byte
00287     Color Spaces: RGB, MAP and Binary (Gray saved as MAP)
00288     Compressions:
00289       NONE - no compression [default]
00290       RLE  - Run Lenght Encoding (only for MAP and Gray)
00291     Only one image.
00292     Can have an alpha channel (only for RGB)
00293     Internally the components are always packed.
00294     Lines arranged from top down to bottom or bottom up to top. But are saved always as bottom up.
00295 
00296     Attributes:
00297       ResolutionUnit (string) ["DPC", "DPI"]
00298       XResolution, YResolution IM_FLOAT (1)
00299 
00300     Comments:
00301       Reads OS2 1.x and Windows 3, but writes Windows 3 always.
00302       Version 4 and 5 BMPs are not supported.
00303 \endverbatim
00304  * \ingroup format */
00305 void imFormatRegisterBMP(void);
00306 
00307 /** \defgroup ras RAS - Sun Raster File
00308  * \section Description
00309  *
00310  * \par
00311  * Copyright Sun Corporation.
00312  * \par
00313  * Internal Implementation.
00314  *
00315  * \section Features
00316  *
00317 \verbatim
00318     Data Types: Byte
00319     Color Spaces: Gray, RGB, MAP and Binary
00320     Compressions:
00321       NONE - no compression   [default]
00322       RLE  - Run Lenght Encoding
00323     Only one image.
00324     Can have an alpha channel (only for IM_RGB)
00325     Internally the components are always packed.
00326     Internally the lines are arranged from top down to bottom.
00327 
00328     Attributes:
00329       none
00330 \endverbatim
00331  * \ingroup format */
00332 void imFormatRegisterRAS(void);
00333 
00334 /** \defgroup led LED - IUP image in LED
00335  * \section Description
00336  *
00337  * \par
00338  * Copyright Tecgraf/PUC-Rio and PETROBRAS/CENPES.
00339  * \par
00340  * Internal Implementation.
00341  *
00342  * \section Features
00343  *
00344 \verbatim
00345     Data Types: Byte
00346     Color Spaces: MAP only (Gray and Binary saved as MAP)
00347     Compressions:
00348       NONE - no compression  [default]
00349     Only one image.
00350     No alpha channel.
00351     Internally the lines are arranged from top down to bottom.
00352 
00353     Attributes:
00354       none
00355 
00356     Comments:
00357       LED file must start with "LEDImage = IMAGE[".
00358 \endverbatim
00359  * \ingroup format */
00360 void imFormatRegisterLED(void);
00361 
00362 /** \defgroup sgi SGI - Silicon Graphics Image File Format
00363  * \section Description
00364  *
00365  * \par
00366  * SGI is a trademark of Silicon Graphics, Inc.
00367  * \par
00368  * Internal Implementation.
00369  *
00370  * \section Features
00371  *
00372 \verbatim
00373     Data Types: Byte and UShort
00374     Color Spaces: Gray and RGB (Binary saved as Gray, MAP with fixed palette when reading only)
00375     Compressions:
00376       NONE - no compression  [default]
00377       RLE  - Run Lenght Encoding
00378     Only one image.
00379     Can have an alpha channel (only for IM_RGB)
00380     Internally the components are always packed.
00381     Internally the lines are arranged from bottom up to top.
00382 
00383     Attributes:
00384       Description (string)
00385 \endverbatim
00386  * \ingroup format */
00387 void imFormatRegisterSGI(void);
00388 
00389 /** \defgroup pcx PCX - ZSoft Picture
00390  * \section Description
00391  *
00392  * \par
00393  * Copyright ZSoft Corporation. \n
00394  * ZSoft (1988) PCX Technical Reference Manual.
00395  * \par
00396  * Internal Implementation.
00397  *
00398  * \section Features
00399  *
00400 \verbatim
00401     Data Types: Byte
00402     Color Spaces: RGB, MAP and Binary (Gray saved as MAP)
00403     Compressions:
00404       NONE - no compression
00405       RLE  - Run Lenght Encoding [default - since uncompressed PCX is not well supported]
00406     Only one image.
00407     No alpha channel.
00408     Internally the components are always packed.
00409     Internally the lines are arranged from top down to bottom.
00410 
00411     Attributes:
00412       ResolutionUnit (string) ["DPC", "DPI"]
00413       XResolution, YResolution IM_FLOAT (1)
00414       XScreen, YScreen IM_USHORT (1) screen position
00415 
00416     Comments:
00417       Reads Versions 0-5, but writes Version 5 always.
00418 \endverbatim
00419  * \ingroup format */
00420 void imFormatRegisterPCX(void);
00421 
00422 /** \defgroup tga TGA - Truevision Graphics Adapter File
00423  * \section Description
00424  *
00425  * \par
00426  * Truevision TGA File Format Specification Version 2.0 \n
00427  * Technical Manual Version 2.2 January, 1991           \n
00428  * Copyright 1989, 1990, 1991 Truevision, Inc.
00429  * \par
00430  * Internal Implementation.
00431  *
00432  * \section Features
00433  *
00434 \verbatim
00435     Supports 8 bits per component only. Data type is always Byte.
00436     Color Spaces: Gray, RGB and MAP (Binary saved as Gray)
00437     Compressions:
00438       NONE - no compression [default]
00439       RLE  - Run Lenght Encoding
00440     Only one image.
00441     No alpha channel.
00442     Internally the components are always packed.
00443     Internally the lines are arranged from bottom up to top or from top down to bottom.
00444 
00445     Attributes:
00446       XScreen, YScreen IM_USHORT (1) screen position
00447       Title, Author, Description, JobName, Software (string)
00448       SoftwareVersion (read only) (string)
00449       DateTimeModified (string) [when writing uses the current system time]
00450       Gamma IM_FLOAT (1)
00451 \endverbatim
00452  * \ingroup format */
00453 void imFormatRegisterTGA(void);
00454 
00455 /** \defgroup pnm PNM - Netpbm Portable Image Map
00456  * \section Description
00457  *
00458  * \par
00459  * PNM formats Copyright Jef Poskanzer
00460  * \par
00461  * Internal Implementation.
00462  *
00463  * \section Features
00464  *
00465 \verbatim
00466     Data Types: Byte and UShort
00467     Color Spaces: Gray, RGB and Binary
00468     Compressions:
00469       NONE - no compression [default]
00470       ASCII (textual data)
00471     Can have more than one image, but sequencial access only.
00472     No alpha channel.
00473     Internally the components are always packed.
00474     Internally the lines are arranged from top down to bottom.
00475 
00476     Attributes:
00477       Description (string)
00478 
00479     Comments:
00480       In fact ASCII is an expansion, not a compression, because the file will be larger than binary data.
00481 \endverbatim
00482  * \ingroup format */
00483 void imFormatRegisterPNM(void);
00484 
00485 /** \defgroup ico ICO - Windows Icon
00486  * \section Description
00487  *
00488  * \par
00489  * Windows Copyright Microsoft Corporation.
00490  * \par
00491  * Internal Implementation.
00492  *
00493  * \section Features
00494  *
00495 \verbatim
00496     Data Types: Byte
00497     Color Spaces: RGB, MAP and Binary (Gray saved as MAP)
00498     Compressions:
00499       NONE - no compression [default]
00500     Can have more than one image. But writing is limited to 5 images,
00501       and all images must have different sizes and bpp.
00502     Can have an alpha channel (only for RGB)
00503     Internally the components are always packed.
00504     Internally the lines are arranged from bottom up to top.
00505 
00506     Attributes:
00507       TransparencyIndex IM_BYTE (1)
00508 
00509     Comments:
00510       If the user specifies an alpha channel, the AND mask is loaded as alpha if
00511         the file color mode does not contain the IM_ALPHA flag.
00512       For MAP imagens, if the user does not specifies an alpha channel
00513         the TransparencyIndex is used to initialize the AND mask when writing,
00514         and if the user does specifies an alpha channel
00515         the most repeated index with transparency will be the transparent index.
00516       Although any size and common bpp can be used is recomended to use the typical configurations:
00517         16x16, 32x32, 48x48, 64x64 or 96x96
00518         2 colors, 16 colors, 256 colors, 24bpp or 32bpp
00519 \endverbatim
00520  * \ingroup format */
00521 void imFormatRegisterICO(void);
00522 
00523 /** \defgroup krn KRN - IM Kernel File Format
00524  * \section Description
00525  *
00526  * \par
00527  * Textual format to provied a simple way to create kernel convolution images.
00528  * \par
00529  * Internal Implementation.
00530  *
00531  * \section Features
00532  *
00533 \verbatim
00534     Data Types: Byte, Int
00535     Color Spaces: Gray
00536     Compressions:
00537       NONE - no compression [default]
00538     Only one image.
00539     No alpha channel.
00540     Internally the lines are arranged from top down to bottom.
00541 
00542     Attributes:
00543       Description (string)
00544 
00545     Comments:
00546       The format is very simple, inspired by PNM.
00547       It was developed because PNM does not have support for INT and FLOAT.
00548       Remeber that usually convolution operations use kernel size an odd number.
00549 
00550     Format Model:
00551       IMKERNEL
00552       Description up to 512 characters
00553       width height
00554       type (0 - IM_INT, 1 - IM_FLOAT)
00555       data...
00556 
00557     Example:
00558       IMKERNEL
00559       Gradian
00560       3 3
00561       0
00562       0 -1 0
00563       0  1 0
00564       0  0 0
00565 \endverbatim
00566  * \ingroup format */
00567 void imFormatRegisterKRN(void);
00568 
00569 
00570 #if defined(__cplusplus)
00571 }
00572 #endif
00573 
00574 #endif

Generated on Thu Oct 1 11:40:01 2009 for IM by  doxygen 1.6.1