IM: RAW - RAW File

IM - An Imaging Tool

RAW - RAW File
[File Formats]


Detailed Description

The file must be open/created with the functions imFileOpenRaw and imFileNewRaw.

Description

Internal Implementation.
Supports RAW binary images. You must know image parameters a priori.
You must set the IM_INT attributes "Width", "Height", "ColorMode", "DataType" before the imFileReadImageInfo/imFileWriteImageInfo functions.
The data must be in binary form, but can start in an arbitrary offset from the begining of the file, use attribute "StartOffset". The default is at 0 offset.
Integer sign and double precision can be converted using attribute "SwitchType".
The conversions will be BYTE<->CHAR, USHORT<->SHORT, INT<->UINT, FLOAT<->DOUBLE.
Byte Order can be Little Endian (Intel=1) or Big Endian (Motorola=0), use the attribute "ByteOrder", the default is the current CPU.
The lines can be aligned to a BYTE (1), WORD (2) or DWORD (4) boundaries, ue attribute "Padding" with the respective value.
See im_raw.h

Features

    Data Types: <all>
    Color Spaces: all, except MAP.
    Compressions: 
      NONE - no compression 
    Can have more than one image, depends on "StartOffset" attribute.
    Can have an alpha channel.
    Components can be packed or not.
    Lines arranged from top down to bottom or bottom up to top.
    Handle() returns a imBinFile* pointer.

    Attributes:
      Width, Height, ColorMode, DataType IM_INT (1)
      StartOffset, SwitchType, ByteOrder, Padding  IM_INT (1)


Functions

imFileimFileOpenRaw (const char *file_name, int *error)
imFileimFileNewRaw (const char *file_name, int *error)

Function Documentation

imFile* imFileOpenRaw const char *  file_name,
int *  error
 

Opens a RAW image file.

im.FileOpenRaw(file_name: string) -> ifile: imFile, error: number [in Lua 5] 

imFile* imFileNewRaw const char *  file_name,
int *  error
 

Creates a RAW image file.

im.FileNewRaw(file_name: string) -> ifile: imFile, error: number [in Lua 5]