Subject: Re: looking for the FAXX format specification Date: 17 Jul 98 09:44:27 +1000 From: "Dr Greg Perry" To: "laurent clevy" On 16-Jul-98 22:52:55 laurent clevy wrote: >Good morning people at GPSoftware, >I would like to know where i can find to FAXX file format used by your FAX >software. My goal is an write a free and portable object-oriented file >recognition application under GPL. This program will run on AmigaOS and >Linux, at least. >I thank you in advance, >Best Regards, >Laurent Clévy See below. ps. please 'fix' your mailer so it doesn't duplicate this html junk at the end of the message ;-( > > > > > > #include fax_iff.h #ifndef ID_FAXX /************************************************************************ * FAX_IFF.H * * * * Defined by Dr Greg Perry & R Carde - GPSoftware * * PO BOX 570 Ashgrove Auastralia 4060 * * Email: greg@gpsoft.com.au * * Web: www.gpoft.com.au * * * Issue 1 12.12.91 * * * * * ************************************************************************/ #define ID_AFAX MakeID('A','F','A','X') #define ID_FX1D MakeID('F','X','1','D') #define ID_FXPG MakeID('F','X','P','G') /***************************************************************************/ /* FaxxIFF.h */ /***************************************************************************/ #define ID_FAXX MakeID('F','A','X','X') #define ID_FXHD MakeID('F','X','H','D') #define ID_PAGE MakeID('P','A','G','E') #define ID_FLOG MakeID('F','L','O','G') /* LineLength Codes */ #define FXLNGSTD 215 /* 1728 pixels along std line lng of 215mm */ #define FXLNGLONG 255 /* 2048 pixels along opt line lng of 255mm */ #define FXLNGLONGER 303 /* 2432 pixels along opt line lng of 303mm */ #define FXLNGA5 151 /* 1216/1728 pixels along opt line lng of 151mm */ #define FXLNGA6 107 /* 864/1728 pixels along opt line lng of 107mm */ /* VRes Codes */ #define FXVRESNORM 385 /* Normal resolution: 3.85 lines/mm */ #define FXVRESFINE 770 /* Fine resolution: 7.7 lines/mm */ /* Compression Codes */ /* Codes 129, 130, and 131 are reserved */ #define FXCMPNONE 0 /* No compression -- available under Group IV */ #define FXCMPMH 1 /* One-dimensional (MH) coding */ #define FXCMPMR 2 /* Two-dimensional (MR) coding */ #define FXCMPMMR 4 /* Modified Two-dimensional (MMR) coding */ struct FaxHeader { UWORD Width, Height; /* Image width and height, in pixels */ UWORD LineLength; /* Scan line length, in millimeters */ UWORD VRes; /* Vertical Resolution, in lines/100mm */ UBYTE Compression; /* Compression method */ UBYTE Pad[11]; /* Room for expansion */ } ; /************************************************************************ * define as FAX form for any Group 3 fax * ************************************************************************/ #define ID_GPHD MakeID('G','P','H','D') #define ID_FAX3 MakeID('F','A','X','3') #define VRES_STD 0 /* standard mode 98 DPI */ #define VRES_FINE 1 /* fine res 198 DPI */ #define COMP_NONE 255 /* no compression- binary file */ #define COMP_1D 0 /* 1-D modified HUFFMAN */ #define COMP_2D 1 /* 2-D modified REED */ #define COMP_2DU 2 /* 2-D uncompressed REED */ #define COMP_2DM 3 /* 2-D modified modified REED */ /* VR-std scan time VR-fine */ #define ST_0_0MS 0 /* 0ms 0ms */ #define ST_5_5MS 1 /* 5ms 5ms */ #define ST_10_5MS 2 /* 10ms 5ms */ #define ST_10_10MS 3 /* 10ms 10ms */ #define ST_20_10MS 4 /* 20ms 10ms */ #define ST_20_20MS 5 /* 20ms 20ms */ #define ST_40_20MS 6 /* 40ms 20ms */ #define ST_40_40MS 7 /* 40ms 40ms */ #define PW_1728 0 /* 1728 pels in 215 mm */ #define PW_2048 1 /* 2048 pels in 255 mm */ #define PW_2432 2 /* 2432 pels in 303 mm */ #define PW_1216 3 /* 1216 pels in 151 mm */ #define PW_864 4 /* 864 pels in 107 mm */ #define PH_UNLIM 0 /* unlimited page length */ #define PH_A4 1 /* A4 PAGE 297 mm */ #define PH_B4 2 /* B4 PAGE 364 mm */ #define BR_2400 0 /* 2400 bits per second */ #define BR_4800 1 #define BR_7200 2 #define BR_9600 3 #define BR_12000 4 #define BR_14400 5 #define ECM_NONE 0 /* Error Correction Disabled */ #define ECM_STD 1 /* Error Correction Enabled */ #define BFT_NONE 0 /* Binary Transfer Disabled */ #define BFT_STD 1 /* Binary Transfer Enabled */ struct GPHD { UWORD gp_Width; /* width in pels */ UWORD gp_Length; /* length / height in pels */ UWORD gp_Page; /* page number */ UBYTE gp_ID[22]; /* id string 20 ch NULL term */ UBYTE gp_VRes; /* Vertical Res dpi */ UBYTE gp_BitRate; /* connection bit rate */ UBYTE gp_PageWidth; /* page width */ UBYTE gp_PageLength; /* page length/height */ UBYTE gp_Compression; /* compression method */ UBYTE gp_ErrorCorrection; /* ECM mode */ UBYTE gp_BinaryFileTransfer; /* binary transfer mode */ UBYTE gp_ScanTime; /* Scan Time ms */ struct DateStamp gp_Date; /* date sent/received */ UBYTE gp_Pad[10]; }; #endif -- Regards, Dr Greg Perry GPSoftware, PO Box 570, Ashgrove, Qld Australia 4060 Ph/fax +61 7 33661402 Internet Email: greg@gpsoft.com.au WWW : http://www.gpsoft.com.au/ -------------------------------------------------------