3 |
File Format .im |
Anyware shares the same Applixware file formats.
This chapter describes the generic ASCII file format of all Version 4.3, 4.4 and 5.0 Applixware documents and the Applixware bitmap internal file format.
The following topics are described:
· File header / File footer
· image_info_segment
· colormap_segment
· data_segment
· mask_segment
The Applixware bitmap file format is an ascii, token based format, with a maximum line length of 70 characters per line. The file format is as follows:
+---------------------------------------------------------------------------------------+
Bitmap_file := file_header
raster_material
file_footer
+---------------------------------------------------------------------------------------+
file_header := *START RASTER VERSION=revnum
ENCODING=encoding
or *BEGIN RASTER VERSION=revnum ENCODING=encoding
revnum := current revnum/minimum revnum
current revnum = 440 or 500
minimum revnum = 320
encoding := 7BIT (encode non-ascii characters) or NONE (raw)
+---------------------------------------------------------------------------------------+
file_footer := *END RASTER
+---------------------------------------------------------------------------------------+
raster_material := image_info__segment
colormap_segment
data_segment
mask_segment
+---------------------------------------------------------------------------------------+
image_info_segment := WIDTH NUMBER (indicating width in pixels of RASTER)
HEIGHT NUMBER (indicating height in pixels of RASTER)
DEPTH 1 | 8 (indicating bits per pixel of RASTER)
+---------------------------------------------------------------------------------------+
colormap_segment := [COLORMAP
colormap_material
[...]
END COLORMAP]
[...]
colormap_material := "color_name" cyan magenta yellow black ink_type see_thru
color_name := STRING (bounded by quotes)
cyan := NUMBER from 0 to FF (0 indicating no color, FF indicating max color)
magenta := NUMBER from 0 to FF (0 indicating no color, FF indicating max color)
yellow := NUMBER from 0 to FF (0 indicating no color, FF indicating max color)
black := NUMBER from 0 to FF (0 indicating no color, FF indicating max color)
ink_type := 0 (process color) or 1 (spot color)
see_thru := 0 (opaque) or 1 (transparent)
NOTE: Documents contain a colormap if depth of the raster is 8. If the file does not contain a colormap_segment, a single default colormap is assumed. The default colormap is:
COLORMAP
"Transparent"0000000001
"Black"000000FF00
"White"0000000000
"color003"0000007F00
"color004"0000003F00
"color005"0000002100
"color006"0000000C00
"color007"C0C0403F00
"color008"E0E0201F00
"color009"EFEF111000
"color010"F9F9060600
"color011"FFFF000000
"color012"C040C03F00
"color013"C040403F00
"color014"E060201F00
"color015"EF6F111000
"color016"F979060600
"color017"FF7F000000
"color018"E020E01F00
"color019"E020601F00
"color020"E020201F00
"color021"EF2F111000
"color022"F939060600
"color023"FF3F000000
"color024"EF11EF1000
"color025"EF116F1000
"color026"EF112F1000
"color027"EF11111000
"color028"F91B060600
"color029"FF21000000
"color030"F906F90600
"color031"F906790600
"color032"F906390600
"color033"F9061B0600
"color034"F906060600
"color035"FF0C000000
"color036"FF00FF0000
"color037"FF007F0000
"color038"FF003F0000
"color039"FF00210000
"color040"FF000C0000
"color041"FF00000000
"color042"40C0C03F00
"color043"40C0403F00
"color044"60E0201F00
"color045"6FEF111000
"color046"79F9060600
"color047"7FFF000000
"color048"4040C03F00
"color049"6060201F00
"color050"6F6F111000
"color051"7979060600
"color052"7F7F000000
"color053"6020E01F00
"color054"6020601F00
"color055"6020201F00
"color056"6F2F111000
"color057"7939060600
"color058"7F3F000000
"color059"6F11EF1000
"color060"6F116F1000
"color061"6F112F1000
"color062"6F11111000
"color063"791B060600
"color064"7F21000000
"color065"7906F90600
"color066"7906790600
"color067"7906390600
"color068"79061B0600
"color069"7906060600
"color070"7F0C000000
"color071"7F00FF0000
"color072"7F007F0000
"color073"7F003F0000
"color074"7F00210000
"color075"7F000C0000
"color076"7F00000000
"color077"20E0E01F00
"color078"20E0601F00
"color079"20E0201F00
"color080"2FEF111000
"color081"39F9060600
"color082"3FFF000000
"color083"2060E01F00
"color084"2060601F00
"color085"2060201F00
"color086"2F6F111000
"color087"3979060600
"color088"3F7F000000
"color089"2020E01F00
"color090"2020601F00
"color091"2F2F111000
"color092"3939060600
"color093"3F3F000000
"color094"2F11EF1000
"color095"2F116F1000
"color096"2F112F1000
"color097"2F11111000
"color098"391B060600
"color099"3F21000000
"color100"3906F90600
"color101"3906790600
"color102"3906390600
"color103"39061B0600
"color104"3906060600
"color105"3F0C000000
"color106"3F00FF0000
"color107"3F007F0000
"color108"3F003F0000
"color109"3F00210000
"color110"3F000C0000
"color111"3F00000000
"color112"11EFEF1000
"color113"11EF6F1000
"color114"11EF2F1000
"color115"11EF111000
"color116"1BF9060600
"color117"21FF000000
"color118"116FEF1000
"color119"116F6F1000
"color120"116F2F1000
"color121"116F111000
"color122"1B79060600
"color123"217F000000
"color124"112FEF1000
"color125"112F6F1000
"color126"112F2F1000
"color127"112F111000
"color128"1B39060600
"color129"213F000000
"color130"1111EF1000
"color131"11116F1000
"color132"11112F1000
"color133"1B1B060600
"color134"2121000000
"color135"1B06F90600
"color136"1B06790600
"color137"1B06390600
"color138"1B061B0600
"color139"1B06060600
"color140"210C000000
"color141"2100FF0000
"color142"21007F0000
"color143"21003F0000
"color144"2100210000
"color145"21000C0000
"color146"2100000000
"color147"06F9F90600
"color148"06F9790600
"color149"06F9390600
"color150"06F91B0600
"color151"06F9060600
"color152"0CFF000000
"color153"0679F90600
"color154"0679790600
"color155"0679390600
"color156"06791B0600
"color157"0679060600
"color158"0C7F000000
"color159"0639F90600
"color160"0639790600
"color161"0639390600
"color162"06391B0600
"color163"0639060600
"color164"0C3F000000
"color165"061BF90600
"color166"061B790600
"color167"061B390600
"color168"061B1B0600
"color169"061B060600
"color170"0C21000000
"color171"0606F90600
"color172"0606790600
"color173"0606390600
"color174"06061B0600
"color175"0C0C000000
"color176"0C00FF0000
"color177"0C007F0000
"color178"0C003F0000
"color179"0C00210000
"color180"0C000C0000
"color181"0C00000000
"color182"00FFFF0000
"color183"00FF7F0000
"color184"00FF3F0000
"color185"00FF210000
"color186"00FF0C0000
"color187"00FF000000
"color188"007FFF0000
"color189"007F7F0000
"color190"007F3F0000
"color191"007F210000
"color192"007F0C0000
"color193"007F000000
"color194"003FFF0000
"color195"003F7F0000
"color196"003F3F0000
"color197"003F210000
"color198"003F0C0000
"color199"003F000000
"color200"0021FF0000
"color201"00217F0000
"color202"00213F0000
"color203"0021210000
"color204"00210C0000
"color205"0021000000
"color206"000CFF0000
"color207"000C7F0000
"color208"000C3F0000
"color209"000C210000
"color210"000C0C0000
"color211"000C000000
"color212"0000FF0000
"color213"00007F0000
"color214"00003F0000
"color215"0000210000
"color216"00000C0000
"color217"0000000000
"color218"0000000000
"color219"0000000000
"color220"0000000000
"color221"0000000000
"color222"0000000000
"color223"0000000000
"color224"0000000000
"color225"0000000000
"color226"0000000000
"color227"0000000000
"color228"0000000000
"color229"0000000000
"color230"0000000000
"color231"0000000000
"color232"0000000000
"color233"0000000000
"color234"0000000000
"color235"0000000000
"color236"0000000000
"color237"0000000000
"color238"0000000000
"color239"0000000000
"color240"0000000000
"color241"0000000000
"color242"0000000000
"color243"0000000000
"color244"0000000000
"color245"0000000000
"color246"0000000000
"color247"0000000000
"color248"0000000000
"color249"0000000000
"color250"0000000000
"color251"0000000000
"color252"0000000000
"color253"0000000000
"color254"0000000000
"color255"0000000000
END COLORMAP
+---------------------------------------------------------------------------------------+
data_segment := DATA RASTER
RASTER data has a width and height, specified in pixels. It also has a depth. Depth 1 images use the default colormap and have 1 bit per pixel. Color images can have a colormap, and have 8 bits per pixel. If there is no colormap a default colormap is used. RASTER material is not encoded. It is output in HEX (2 per character).
The Applixware RASTER is organized in a very traditional manner. Each horizontal"scanline" of an image is composed of an even number of 8-bit bytes running from left to right. The MSB of each byte is displayed to the left of its LSB. A sequence of scanlines, running from its top to its bottom form the complete image. Each scanline is represented by a string of ASCII characters (70 chars per scanline ).
+---------------------------------------------------------------------------------------+
mask_segment := MASK RASTER
Mask raster can be present for color bitmaps. If there is no mask then mask will be calculated using the colormap and the data.