Projects/Liberty/File Formats/Viking Pfaff: Difference between revisions

From KDE Community Wiki
No edit summary
No edit summary
Line 18: Line 18:


Stitches = Stitches-header {Stitch}
Stitches = Stitches-header {Stitch}
Stitch = Escaped-command | Displacement


===File-header===
===File-header===
Line 226: Line 228:
|}
|}


===Thread-header===
===Thread===
{| class="wikitable"
{| class="wikitable"
| Offset
| Offset
Line 297: Line 299:
| Record
| Record
| Stitches
| Stitches
- 27+N5+N6+N7
|-
| 27+N5+N6+N7
| 1
| 1
| Byte
| Byte
Line 324: Line 327:
| Byte
| Byte
| unknown = 0
| unknown = 0
|  
|-
| 5
| 5
| 1
| 1
Line 354: Line 357:
|}
|}


===Thread-text===
===Stitches-header===
{| class="wikitable"
{| class="wikitable"
| Offset
| Offset
Line 362: Line 365:
|-
|-
| 0
| 0
| N6a
| 3
| N-Str
| Tag
| Thread-code 16 bit length followed by ASCII characters part-number
| Stitches-tag = 00 01 00
|-
| 3
| 4
| Length
| Stitches-len
|-
| 7
| 1
| Byte
| Scale-X = 10
|-
| 8
| 1
| Byte
| Scale-Y = -10
|-
| 9
| 1
| Byte
| unknown = 0
|}
 
===Escaped-command===
{| class="wikitable"
| Offset
| Length
| Type
| Description
|-
|-
| 0+N6a
| 0
| N6b
| 1
| N-Str
| Byte
| Thread-name human readable name of thread
| Escape = -128 or 0x80
|-
|-
| 0+N6a+N6b
| 1
| N6c
| 1
| N-Str
| Byte
| Thread-manu maker, material and weight
| Command-code
|}
|}


This file format appears to describe a stitch out similar to that used in [[Projects/Liberty/File_Formats/Janome_Embroidery_Format|JEF]] files.
===Displacement===
{| class="wikitable"
| Offset
| Length
| Type
| Description
|-
| 0
| 1
| Byte
| Displacement-X -127 to 127
|-
| 1
| 1
| Byte
| Displacement-Y -127 to 127
|}





Revision as of 16:31, 8 August 2012

Viking/Husqvarna Pfaff/Singer 3 VP3

The VP3 file format appears to be series of nested sections. Most sections contain tagged records.

In the style of Backus–Naur Form,

File = File-header Extent

Extent = Extent-header {Hoop}

Hoop = Hoop-header Canvas Threads

Threads = Threads-header {Thread}

Thread = Thread-header Colours Thread-text Thread-detail Stitches Thread-end

Colours = {Colour-detail}

Stitches = Stitches-header {Stitch}

Stitch = Escaped-command | Displacement

File-header

Offset Length Type Description
0 6 ASCIIZ Signature = "%vsn%"
6 N1 N-WStr Producer 16 bit big-endian length in bytes followed by 16 bit characters
6+N1

Extent-header

Offset Length Type Description
0 3 Tag Extent-tag 00 02 00 three bytes
3 4 Length Extent-len remaining bytes in file
3 N2 N-WStr Settings human readable debugging notes
7+N2 4 MicroM Extent-top top edge of stitching in um
11+N2 4 MicroM Extent-right
15+N2 4 MicroM Extent-bottom
19+N2 4 MicroM Extent-left
23+N2 4 Count Total-stitch-count
27+N2 2 Count Total-thread-count
29+N2 1 Byte unknown = 12
30+N2 2 Count unknown = 1 may be hoop-count

Hoop-header

Offset Length Type Description
0 3 Tag Hoop-tag = 00 03 00
3 4 Length Hoop-len
7 4 MicroM Centre-X
11 4 MicroM Centre-Y
15 3 Tag Canvas-tag = 00 00 00
18 4 MicroM Hoop-left
22 4 MicroM Hoop-right
26 4 MicroM Hoop-bottom
30 4 MicroM Hoop-top
34 4 MicroM Hoop-width
38 4 MicroM Hoop-height
42 N3 N-WStr Settings-2 second copy of Settings
42+N3 1 Byte unknown = 100
43+N3 1 Byte unknown = 100
44+N3 4 int unknown = 4096
48+N3 4 int unknown = 0
52+N3 4 int unknown = 0
56+N3 4 int unknown = 4096

Threads-header

Offset Length Type Description
0 6 Bytes Threads-sig = 120 120 80 80 1 0
6 N4 N-WStr Producer-2 copy of producer text
6+N4 2 Count Thread-count

Thread

Offset Length Type Description
0 3 Tag Thread-tag = 00 05 00
3 4 Length Thread-len bytes to next thread
7 4 MicroM Start-X
11 4 MicroM Start-Y
15 1 Count Colours-per-thread
16 1 Byte unknown = 0
17 N5 Table Colours
17+N5 1 Code Thread-type-tension
18+N5 1 Byte Thread-weight
19+N5 N6 Record Thread-text human readable thread description
19+N5+N6 4 MicroM unknown-X
23+N5+N6 4 MicroM unknown-Y
27+N5+N6 N7 Record Stitches
27+N5+N6+N7 1 Byte unknown = 0

Colour-detail

Offset Length Type Description
0 3 RRGGBB Colour-RGB
3 1 Byte unknown = 0 or 10
4 1 Byte unknown = 0
5 1 Byte unknown = 0, 20, or 10

Thread-text

Offset Length Type Description
0 N6a N-Str Thread-code 16 bit length followed by ASCII characters part-number
0+N6a N6b N-Str Thread-name human readable name of thread
0+N6a+N6b N6c N-Str Thread-manu maker, material and weight

Stitches-header

Offset Length Type Description
0 3 Tag Stitches-tag = 00 01 00
3 4 Length Stitches-len
7 1 Byte Scale-X = 10
8 1 Byte Scale-Y = -10
9 1 Byte unknown = 0

Escaped-command

Offset Length Type Description
0 1 Byte Escape = -128 or 0x80
1 1 Byte Command-code

Displacement

Offset Length Type Description
0 1 Byte Displacement-X -127 to 127
1 1 Byte Displacement-Y -127 to 127