IM: File Formats

IM - Imaging Libray

File Formats
[Image Storage]


Detailed Description

See im.h
Internal Predefined File Formats:
  • "BMP" - Windows Device Independent Bitmap
  • "PCX" - ZSoft Picture
  • "GIF" - Graphics Interchange Format
  • "TIFF" - Tagged Image File Format
  • "RAS" - Sun Raster File
  • "SGI" - Silicon Graphics Image File Format
  • "JPEG" - JPEG File Interchange Format
  • "LED" - IUP image in LED
  • "TGA" - Truevision Targa
  • "RAW" - RAW File
  • "PNM" - Netpbm Portable Image Map
  • "ICO" - Windows Icon
  • "PNG" - Portable Network Graphic Format
Other Supported File Formats:
  • "JP2" - JPEG-2000 JP2 File Format
  • "AVI" - Windows Audio-Video Interleaved RIFF
  • "WMV" - Windows Media Video Format
Some Known Compressions:
  • "NONE" - No Compression.
  • "RLE" - Run Lenght Encoding.
  • "LZW" - Lempel, Ziff and Welsh.
  • "JPEG" - Join Photographics Experts Group.
  • "DEFLATE" - LZ77 variation (ZIP)


Modules

group  TIFF - Tagged Image File Format
group  JPEG - JPEG File Interchange Format
group  PNG - Portable Network Graphic Format
group  GIF - Graphics Interchange Format
group  BMP - Windows Device Independent Bitmap
group  RAS - Sun Raster File
group  LED - IUP image in LED
group  SGI - Silicon Graphics Image File Format
group  PCX - ZSoft Picture
group  TGA - Truevision Graphics Adapter File
group  PNM - Netpbm Portable Image Map
group  ICO - Windows Icon
group  KRN - IM Kernel File Format
group  AVI - Windows Audio-Video Interleaved RIFF
group  JP2 - JPEG-2000 JP2 File Format
group  RAW - RAW File
group  WMV - Windows Media Video Format

Functions

void imFormatList (char **format_list, int *format_count)
int imFormatInfo (const char *format, char *desc, char *ext, int *can_sequence)
int imFormatCompressions (const char *format, char **comp, int *comp_count, int color_mode, int data_type)
int imFormatCanWriteImage (const char *format, const char *compression, int color_mode, int data_type)

Function Documentation

void imFormatList char **  format_list,
int *  format_count
 

Returns a list of the registered formats.
format_list is an array of format identifiers. Each format identifier is 10 chars max, maximum of 50 formats. You can use "char* format_list[50]".

int imFormatInfo const char *  format,
char *  desc,
char *  ext,
int *  can_sequence
 

Returns the format description.
Format description is 50 chars max.
Extensions are separated like "*.tif;*.tiff;", 50 chars max.
Returns an error code. The parameters can be NULL, except format.

int imFormatCompressions const char *  format,
char **  comp,
int *  comp_count,
int  color_mode,
int  data_type
 

Returns the format compressions.
Compressions are 20 chars max each, maximum of 50 compressions. You can use "char* comp[50]".
color_mode and data_type are optional, use -1 to ignore them.
If you use them they will select only the allowed compressions checked like in imFormatCanWriteImage.
Returns an error code.

int imFormatCanWriteImage const char *  format,
const char *  compression,
int  color_mode,
int  data_type
 

Checks if the format suport the given image class at the given compression.
Returns an error code.