WIF (Weaving Information File) is a line-oriented plain-text format for exchanging weaving drafts between programs. Version 1.1, dated 20 April 1997, is the version used for current interchange.
This document is an annotated reference to WIF 1.1. Format rules follow the 1997 specification. Notes labeled Bower record how Bower and the free WIF Viewer implement those rules. Bower notes are implementation documentation; they are not part of the 1997 specification. For a non-normative overview, see What is a WIF file?.
Bower notes use the following status terms:
- Supported — the field or section is read, written, or both.
- Ignored — the field or section may appear in a file; it is skipped and does not by itself fail import.
- Not written — export never emits the field or section.
- Suspended in 1.1 — listed in the 1997 text, but not part of current interchange.
1. Design goals
WIF is designed to remain extensible, readable in a text editor, and processable by any system that can read plain text.
Structure data is stored as comma-separated shaft and treadle numbers rather than packed binary bitfields. The physical layout resembles a Windows .INI file: bracketed section headers and Key=value lines. Unlike classic Windows 3.1 private-profile files, WIF is not limited to 64K, and the Windows private-profile APIs cannot be used to parse it. A dedicated parser is required.
2. File type
A WIF file is plain text. There is no binary container. The conventional filename extension is .wif. The format is identified from the [WIF] section.
Extension .wif Character encoding ASCII (UTF-8 without BOM is accepted in practice) Line endings LF or CRLF Ordering Section and key order are not significant
Bower. Import and export treat .wif as ordinary text.
3. Lexical rules
The grammar is line-based. Each line is blank, a comment, a section header, or a key/value pair.
- Blank lines are ignored.
- If the first non-space character is
;, the entire line is a comment. A trailing comment may follow a number or boolean, commonly after a second;. Free-text values must not carry a trailing comment on the same line. - Section headers have the form
[Section Name]. Matching is case-insensitive. By convention, names are written in uppercase. - Assignments have the form
Key=value. Key matching is case-insensitive. The value is the remainder of the line after the first=. - Duplicate keys in a section are non-conforming. A reader must not fail the file solely because of a duplicate; it may retain the first or the last value.
- Section order and key order within a section are not significant.
The following fragment illustrates the lexical forms. It is not a complete draft:
; this line is ignored [WEAVING] Shafts=4 Treadles=4
Bower. Blank lines and full-line ; comments are skipped. Names match case-insensitively. For ordinary keys, the last value wins. Structure rows are keyed by number. Values are trimmed. Inline trailing comments are not stripped.
4. Booleans and symbols
Boolean values accepted as true are true, on, yes, and 1. Boolean values accepted as false are false, off, no, and 0. An omitted optional boolean is false unless a specific section states otherwise.
Bower. true, yes, and 1 are treated as true. Any other non-empty value is treated as false. on and off are not special-cased.
A symbol type encodes a single display character used in place of a filled cell:
=1 digit =X single character ='X' quoted character =#219 character code 0..255 Write a space as ' ' or #32. Write a hash as '#' or #35.
Bower. Symbols are not implemented. Appearance is colors only. Symbol sections are ignored on import and are never written on export.
5. Minimum requirements
A conforming 1.1 file contains [WIF] and [CONTENTS]. Every other section that appears in the file must be listed under [CONTENTS] with the value true. Unused sections may be omitted, or listed as false. If a section is present, its required keys must be present.
A file that contains threading data but no [WIF] block is not a valid WIF 1.1 document, even if some tools attempt to read it.
Bower. Import fails without [WIF]. [CONTENTS] is neither required nor validated on import. Export always writes both sections and marks true for every section emitted.
6. Section classes and sparse data
Informational sections record background values (title, palette size, loom counts). Data sections record per-end and per-pick rows (threading, colors, and related tables). [CONTENTS] lists included sections. It does not list [WIF].
Data is sparse. Warp ends and weft picks are allocated from Threads. Defaults are taken from [WARP] and [WEFT]. Structure cells default to zero (unused). Only keys that differ from those defaults need be written. Readers reverse that process.
If eight warp ends share one color and only end 3 differs, the warp default supplies the shared color and a single override records the exception:
[WARP] Threads=8 Color=1 [WARP COLORS] 3=2
Ends 1, 2, and 4–8 use palette color 1; end 3 uses palette color 2. The same rule applies to structure: a missing threading line means no shafts on that end, not a copy of the previous end.
Bower. Thread counts and the structure and color tables are used. Spacing and thickness defaults, and sparse thickness and spacing tables, are not implemented. Structure defaults to empty; missing structure keys remain empty. When a color table is present, [WARP] / [WEFT] Color defaults are applied when the index is greater than zero, then per-end and per-pick overrides are applied.
7. Private sections
Implementations may store private data without breaking interchange. The section name must include a unique source identifier so vendors do not collide:
[PRIVATE <SourceID> <SectionName>] Lines inside must not start with '[' so a reader can find the next section.
Bower. Private sections are skipped and are never written. No private Source ID is defined.
8. Section catalog
This section lists every named section in WIF 1.1 and the Bower implementation status for each. Interchange with Bower depends on structure, color, and the export profile in section 10.
8.1 [WIF] — required
Required identity section. A file without [WIF] is not a valid WIF 1.1 document.
Key Official Description ---- -------- ----------- Version required e.g. 1.1 Date required free-form date string Developers required contact / authors Source Program required creating program name Source Version optional creating program version
Bower. The section is required on import. Export writes Version=1.1, Date=April 20, 1997, [email protected], Source Program=Bower, and Source Version=1.0. Missing individual keys inside [WIF] do not fail import.
8.2 [CONTENTS] — required in 1.1
Table of contents: section name as the key, true or false as the value. Only sections that exist need be listed as true. Listing every defined section with true or false is permitted, not required.
A reader may select sections from CONTENTS alone.
Informational flags: COLOR PALETTE, WARP SYMBOL PALETTE, WEFT SYMBOL PALETTE, TEXT, WEAVING, WARP, WEFT Data flags: NOTES, TIEUP, COLOR TABLE, WARP SYMBOL TABLE, WEFT SYMBOL TABLE, THREADING, WARP THICKNESS, WARP THICKNESS ZOOM, WARP SPACING, WARP SPACING ZOOM, WARP COLORS, WARP SYMBOLS, TREADLING, LIFTPLAN, WEFT THICKNESS, WEFT THICKNESS ZOOM, WEFT SPACING, WEFT SPACING ZOOM, WEFT COLORS, WEFT SYMBOLS, PRIVATE <SourceID> <SectionName> Suspended / reserved: TRANSLATIONS BITMAP IMAGE, BITMAP FILE, BITMAP IMAGE DATA
Bower. CONTENTS is not required on import and is not used to select what to parse. Export writes true for every section actually emitted.
8.3 [COLOR PALETTE]
Declares palette size and the numeric range of RGB values. Older files may use 0–999 rather than 0–255; readers must scale.
Key Official Description ---- -------- ----------- Entries required integer > 0, palette size Range required min,max with max > min Form=RGB obsolete do not write; ignore if present
Range=0,999 with table entry 1=999,0,0 maps the red channel to 255 in 8-bit. Range=0,255 with 1=255,0,0 requires no scaling.
Bower. Range is read (default 0,255 if missing). Each channel is converted with round((c − min) / (max − min) * 255), then clamped to 0–255. If max−min is zero or negative, import fails. Entries is not enforced. Export always uses Range=0,255.
8.4 [WARP SYMBOL PALETTE] / [WEFT SYMBOL PALETTE]
Key Official Description ---- -------- ----------- Entries required integer > 0
Bower. Ignored. Not written.
8.5 [TEXT]
Optional metadata about the piece and the maker: title, author, contact information. None of these keys affect the draft grid.
Key Official ---- -------- Title optional Author optional Address optional EMail optional Telephone optional FAX optional
Bower. Ignored. Not written.
8.6 [WEAVING]
Loom size and shed convention. Shaft and treadle counts may increase if structure sections name higher indices than those declared here.
Key Official Description ---- -------- ----------- Shafts required integer > 0 Treadles required integer > 0 Rising Shed optional true = listed shafts go up Profile obsolete ignore; do not write
Rising shed means the shafts listed in the liftplan (or raised through the treadle/tie-up path) lift. Falling shed is the opposite physical convention. When a file specifies falling shed, liftplan cells — or tie-up cells — are inverted after load so internal grids remain rising-shed and the cloth matches the file.
Bower. Shafts and Treadles are read (default 4 if missing) and grown from structure when needed. Missing Rising Shed is treated as true. False triggers the invert described above. Export always writes Rising Shed=true, and Treadles=0 in liftplan mode. Profile is ignored.
8.7 [WARP] and [WEFT]
These sections describe the warp or weft as a whole and the default for each thread. After Threads is known, that many ends or picks are allocated, defaults are applied, and sparse sections override individuals (section 6).
Key Official Description
---- -------- -----------
Threads required number of ends or picks
Color optional palette index, or index + R,G,B
Symbol optional symbol type
Symbol Number optional index into symbol table
Units required if spacing/ Decipoints | Inches | Centimeters
thickness used
Spacing optional real ≥ 0
Thickness optional real ≥ 0
Spacing Zoom optional integer ≥ 0
Thickness Zoom optional integer ≥ 0
Obsolete in 1.1 (ignore / do not write):
Colors, Palette, ColorMix
For Color, a simple palette index is the preferred interchange form. Some files also attach an RGB triple after the index.
Color=2 ; every end/pick defaults to COLOR TABLE entry 2 Color=2,255,0,0 ; index plus optional RGB — index only is kept
If an implementation supports only one of spacing and thickness, Spacing is preferred when both are present. An implementation that models thickness only should write Spacing, or write both with the same numbers.
Bower. Threads is read (defaults 32 for warp and 48 for weft if missing). Color is read as one palette index when it is greater than zero. Symbols, spacing, thickness, zooms, and extra RGB on Color are ignored. Export writes Threads, Color, and Units=Centimeters.
8.8 [NOTES]
Free text, one string per numbered line. Not part of the draft grids.
1=First line of notes 2=Second line
Bower. Ignored. Not written.
8.9 [TIEUP]
Each treadle lists the shafts it raises (rising-shed sense, before any invert). Used with threading and treadling when the file is not a pure liftplan.
Key = treadle (1..n)
Value = shafts, comma-separated
0 alone means unused
Missing lines stay unused
Example: 1=1,2 → treadle 1 raises shafts 1 and 2
Bower. Supported in tie-up mode. Multi-shaft values are accepted. Export writes one line per treadle.
8.10 [COLOR TABLE]
Palette entries. Warp and weft Color keys refer to indices in this table. The R,G,B numbers use the Range from [COLOR PALETTE].
Key = palette index Value = R,G,B in the palette Range
Palette, warp default, and two per-end overrides:
[COLOR PALETTE] Entries=2 Range=0,255 [COLOR TABLE] 1=200,40,40 2=40,40,200 [WARP] Threads=4 Color=1 [WARP COLORS] 2=2 4=2
Ends 1 and 3 default to palette entry 1; ends 2 and 4 use palette entry 2.
Bower. Supported, with the Range mapping described above. Export writes one table entry per unique yarn color and always uses Range=0,255.
8.11 [WARP SYMBOL TABLE] / [WEFT SYMBOL TABLE]
Key = symbol index Value = WIF symbol type (see section 4)
Bower. Ignored. Not written.
8.12 [THREADING]
Shafts for each warp end. Multiple shafts on one end are permitted.
Key = warp end (1..n)
Value = shaft, or shaft,shaft,...
1=1,5 means end 1 is on shafts 1 and 5
0 means unused
Missing lines stay unused
Bower. Supported, including multi-shaft ends. Export writes one line per end.
8.13 Per-end and per-pick sections
These sections attach values to individual ends or picks. Three groups exist: structure (treadling / liftplan), color, and appearance (thickness, spacing, symbols).
Section Value Default if missing
------- ----- ------------------
[WARP THICKNESS] real ≥ 0 [WARP].Thickness
[WARP THICKNESS ZOOM] integer ≥ 0 [WARP].Thickness Zoom
[WARP SPACING] real ≥ 0 [WARP].Spacing
[WARP SPACING ZOOM] integer ≥ 0 [WARP].Spacing Zoom
[WARP COLORS] palette idx [WARP].Color
(one integer; ignore old R,G,B tail)
[WARP SYMBOLS] symbol idx [WARP].Symbol Number
[TREADLING] treadles unused (zero)
[LIFTPLAN] shafts unused (zero)
[WEFT THICKNESS] real ≥ 0 [WEFT].Thickness
[WEFT THICKNESS ZOOM] integer ≥ 0 [WEFT].Thickness Zoom
[WEFT SPACING] real ≥ 0 [WEFT].Spacing
[WEFT SPACING ZOOM] integer ≥ 0 [WEFT].Spacing Zoom
[WEFT COLORS] palette idx [WEFT].Color
[WEFT SYMBOLS] symbol idx [WEFT].Symbol Number
Treadling is the tie-up control path: the key is the pick, the value is the treadles pressed, for example 5=1,2. Liftplan is direct: the key is the pick, the value is the shafts that rise, for example 5=1,3. A typical file uses one control path, not both (section 8.14).
Bower. Treadling, liftplan, and warp/weft colors are supported. Thickness, spacing, zoom, and symbol sections are ignored and are never written.
8.14 Loom mode, rising shed, and drawdown
There is no mode= key. Loom mode is inferred from which structure sections are present.
Bower and the free WIF Viewer use the following rule:
If [LIFTPLAN] is present
and ([TREADLING] is missing or Treadles is 0)
then treat the file as liftplan
(THREADING + LIFTPLAN)
else treat it as tie-up
(THREADING + TIEUP + TREADLING)
Liftplan is the dobby-style model: each pick lists shafts. Tie-up is the shaft-loom model: treadles select a column of the tie-up, and treadling is the sequence of treadles.
When Rising Shed is false, every liftplan cell (liftplan mode) or every tie-up cell (tie-up mode) is inverted after the grids are loaded. Threading and treadling are left as written.
Rising Shed=true, pick 1=1,2 → shafts 1 and 2 up
Rising Shed=false, same line → those shafts stored as down,
other shafts flipped on
The drawdown is not stored in the file. After structure is loaded and any shed invert is applied, a cloth cell is warp-up if some shaft threaded on that end is also raised on that pick — from the liftplan, or from an active treadle and its tie-up. Otherwise the cell is weft-up. Programs recompute the drawdown for display; there is no drawdown section to export.
Bower. Load and display follow this procedure. The free WIF Viewer uses the same structure and color rules. In liftplan mode the viewer omits the empty tie-up block and shows treadles as “-” in the side panel.
8.15 Suspended and obsolete items
Suspended at 1.1: [TRANSLATIONS] [BITMAP FILE], [BITMAP IMAGE], [BITMAP IMAGE DATA] Dropped / obsolete in the 1.1 narrative: Design section, ColorMix, Colors key, Palette key, RGB tail on WARP/WEFT COLORS
Bower. All of the above are ignored and are not written. Unknown sections do not fail import by themselves.
9. Implementation size limits
These limits are not part of WIF 1.1. On import, dimensions are clamped so a file cannot allocate an unbounded grid. Values outside the range are brought into range rather than rejected as non-WIF.
Warps, wefts 1 .. 4096 Shafts, treadles 1 .. 64
10. Export profile
Bower export is a complete rising-shed WIF 1.1 file intended for readers that understand the core sections below. Notes, symbols, spacing, and private vendor data from a previous import are not preserved across a round trip.
- [WIF], [CONTENTS], [COLOR PALETTE] with Range=0,255, [WEAVING] with Rising Shed=true
- [WARP] and [WEFT] with Threads, Color index, Units=Centimeters
- [COLOR TABLE], [THREADING], [WARP COLORS], [WEFT COLORS]
- Either [LIFTPLAN] and Treadles=0, or both [TIEUP] and [TREADLING]
- No TEXT, NOTES, symbols, spacing, thickness, private, or bitmap sections
11. Examples
The following examples are complete WIF 1.1 files. They contain structure only; they omit a color table.
11.1 Tie-up mode
Eight ends, eight picks, four shafts, four treadles. Straight-draw threading, a twill-style tie-up, and treadling that repeats the four-treadle sequence.
[WIF] Version=1.1 Date=April 20, 1997 [email protected] Source Program=Example Source Version=1.0 [CONTENTS] WEAVING=true WARP=true WEFT=true THREADING=true TIEUP=true TREADLING=true [WEAVING] Shafts=4 Treadles=4 Rising Shed=true [WARP] Threads=8 [WEFT] Threads=8 [THREADING] 1=1 2=2 3=3 4=4 5=1 6=2 7=3 8=4 [TIEUP] 1=1,2 2=2,3 3=3,4 4=1,4 [TREADLING] 1=1 2=2 3=3 4=4 5=1 6=2 7=3 8=4
11.2 Liftplan mode
Four ends, four picks. Treadles is 0 and [LIFTPLAN] is present, so the file is read as liftplan. Each pick lists shafts directly. There is no tie-up and no treadling.
[WIF] Version=1.1 Date=April 20, 1997 [email protected] Source Program=Example [CONTENTS] WEAVING=true WARP=true WEFT=true THREADING=true LIFTPLAN=true [WEAVING] Shafts=4 Treadles=0 Rising Shed=true [WARP] Threads=4 [WEFT] Threads=4 [THREADING] 1=1 2=2 3=3 4=4 [LIFTPLAN] 1=1,2 2=2,3 3=3,4 4=1,4
12. Related software
A .wif file can be opened in the free WIF Viewer to inspect the draft in a browser, or imported into Bower for editing. The viewer provides an Open in Bower action.
13. References
Sources for the format text. Notes labeled Bower on this page describe Bower import and export behavior; they are not part of the 1997 specification.
- Nielsen, Ravi, et al. Weaving Information File (WIF) Specification, Version 1.1. 20 April 1997. Contributors included Ravi Nielsen (Patternland / Maple Hill Software), Bob Keates (Fiberworks), Rob Sinkler (SwiftWeave), and members of the 1997 WIF email list. Text: http://www.tantradharma.com/maplehill/wif/wif1-1.txt.
- Nielsen, Ravi; Keates, Bob; Sinkler, Rob. Weaving Information File (WIF) Specification, Version 1.0. 3 March 1996. Superseded by 1.1 for current interchange.
- Asunder — Bower and the free WIF Viewer.