Projects/Liberty/File Formats/Janome Embroidery Format: Difference between revisions

From KDE Community Wiki
mNo edit summary
Line 1: Line 1:
= Janome Embroidery Format =
== Jamone Embroidery Format JEF ==


The Janome Embroidery Format .jef (and .sow) files contain a header and stitch instructions, but does not contain any obvious signature bytes. The only signature is to see if the thread change table is the correct size and the file length is right for the number of thread changes and the number of stitches. For the .jef+ format there is extra data after the thread tables, then the 32bit aligned string "JANO", "ME\0\0", then a 32bit number (1 for a 1 thread pattern), then a 32bit bitmap-start offset which ruins the .jef 'signature', but now we have the string "JANOME".
The JEF and JEF+ files consists of a number of sections. Multi-byte numbers appear to be stored little endian. For the JEF (and not JEF+ ) files, there is no simple signature, except to see if the Stitch-offset is after the Thread-type-list.


The header contains a date, number of thread changes, number of stitches, stitch extent rectangle, other optional rectangles, and two thread change tables (the first is thread colour).
File =
The stitch instructions are pairs of 8 bit offsets (starting from the centre of the design) with an escape sequence for move, thread change, and end of pattern.
  File-header
  Thread-colour-list
  Thread-type-list
  [Plus-header]
  Stitch-list
  {Plus-detail}


Thread-colour-list = {Thread-colour}
Thread-type-list = {Thread-type}
Stitch-list = {Stitch}
Stitch = Escaped-command | Displacement
===File-header===
{| class="wikitable"
{| class="wikitable"
! Offset !! Description
| Offset
| Length
| Type
| Description
|-
| 0
| 4
| Offset
| Stitch-offset location of first stitch
|-
| 4
| 4
| Flags
| unknown = 1, 10 or 20
|-
| 8
| 8
| ASCII
| Date YYYYMMDD
|-
| 16
| 8
| ASCII
| Time HHMMSSxx
|-
| 24
| 4
| Count
| Thread-count number of thread changes
|-
| 28
| 4
| Count
| Stitch-count
|-
| 32
| 4
| Code
| Hoop-code = 0 to 4
|-
| 36
| 4
| Measure
| Extent-1-left stitch extent left of centre in 0.1 mm units
|-
| 40
| 4
| Measure
| Extent-1-top
|-
| 44
| 4
| Measure
| Extent-1-right
|-
| 48
| 4
| Measure
| Extent-1-bottom
|-
| 52
| 4
| Measure
| Extent-2-left -1 implies not used
|-
| 56
| 4
| Measure
| Extent-2-top
|-
| 60
| 4
| Measure
| Extent-2-right
|-
| 64
| 4
| Measure
| Extent-2-bottom
|-
| 68
| 4
| Measure
| Extent-3-left -1 implies not used
|-
| 72
| 4
| Measure
| Extent-3-top
|-
| 76
| 4
| Measure
| Extent-3-right
|-
| 80
| 4
| Measure
| Extent-3-bottom
|-
| 84
| 4
| Measure
| Extent-4-left -1 implies not used
|-
| 88
| 4
| Measure
| Extent-4-top
|-
| 92
| 4
| Measure
| Extent-4-right
|-
| 96
| 4
| Measure
| Extent-4-bottom
|-
| 100
| 4
| Measure
| Extent-5-left -1 implies not used
|-
| 104
| 4
| Measure
| Extent-5-top
|-
| 108
| 4
| Measure
| Extent-5-right
|-
| 112
| 4
| Measure
| Extent-5-bottom
|}
 
 
{| class="wikitable"
| Hoop-code
| Hoop-name
| Hoop-size
|-
| 0
| A
| 128 x 110 mm
|-
| 1
| C
|  50 x  50 mm
|-
| 2
| B
| 140 x 200 mm
|-
| 3
| F
| 126 x 110 mm
|-
| 4
| D
| 230 x 200 mm
|}
 
===Thread-colour===
{| class="wikitable"
| Offset
| Length
| Type
| Description
|-
| 0
| 4
| Code
| Thread-code = 1 to 78
|}
 
 
{| class="wikitable"
| Thread-code
| Colour-RGB
| Colour-number
| Colour-name
|-
| 0x01
| "#000000"
| 2
| "Black"
|-
| 0x02
| "#F0F0F0"
| 1
| "White"
|-
| 0x03
| "#FFCC00"
| 239
| "Sunflower"
|-
| 0x04
| "#E6651E"
| 254
| "Hazel"
|-
| 0x05
| "#C4E39D"
| 264
| "Green Dust"
|-
| 0x06
| "#237336"
| 226
| "Green"
|-
| 0x07
| "#071650"
| 232
| "Navy Blue"
|-
| 0x08
| "#4CB58F"
| 250
| "Emerald Green"
|-
| 0x09
| "#F669A0"
| 201
| "Pink"
|-
| 0x0a
| "#FF4720"
| 202
| "Vermilion"
|-
| 0x0b
| "#E2A188"
| 236
| "Cinnamon"
|-
| 0x0c
| "#595B61"
| 252
| "Dark Gray"
|-
| 0x0d
| "#E4C35D"
| 3
| "Gold"
|-
| 0x0e
| "#6231BD"
| 261
| "Violet Blue"
|-
| 0x0f
| "#2F5933"
| 219
| "Olive Green"
|-
| 0x10
| "#FAB381"
| 212
| "Peach"
|-
|-
|0x0000
| 0x11
|Stitch-start offset
| "#F999B7"
| 211
| "Pale Pink"
|-
|-
|0x0004
| 0x12
|Flags, domain: 0x1, 0xa
| "#F09C96"
| 256
| "Salmon"
|-
|-
|0x0008
| 0x13
|Date ASCII YYYY
| "#A39166"
| 268
| "Olive Drab"
|-
|-
|0x000C
| 0x14
|Date ASCII MMDD
| "#970533"
| 215
| "Wine Red"
|-
|-
|0x0010
| 0x15
|TIME ASCII HHMM
| "#AC9CC7"
| 209
| "Pale Violet"
|-
|-
|0x0014
| 0x16
|TIME ASCII SS00
| "#65C2C8"
| 217
| "Sky"
|-
|-
|0x0018
| 0x17
|Thread-load-count
| "#E5E5E5"
| 220
| "Silver Gray"
|-
|-
|0x001C
| 0x18
|Stitch-count
| "#A0B8CC"
| 216
| "Pale Sky"
|-
|-
|0x0020
| 0x19
|Hoop-code, domain: 0 "A 126mm x 110mm", 1 "C 50mm x 50mm", 2 "B 140mm x 200mm", 3, 4
| "#98D6BD"
| 227
| "Pale Aqua"
|-
|-
|0x0024
| 0x1a
|Stitch-extent-left 0.1mm units from centre
| "#0B2F84"
| 207
| "Blue"
|-
|-
|0x0028
| 0x1b
|Stitch-extent-top
| "#98F3FE"
| 229
| "Powder Blue"
|-
|-
|0x002C
| 0x1c
|Stitch-extent-right
| "#B2E1E3"
| 228
| "Baby Blue"
|-
|-
|0x0030
| 0x1d
|Stitch-extent-bottom
| "#FF0927"
| 244
| "Cardinal Red"
|-
|-
|0x0034
| 0x1e
|box2-left -- minus 1 appears to indicate not used
| "#14329C"
| 262
| "Blue Ink"
|-
|-
|0x0038
| 0x1f
|box2-top
| "#A80043"
| 242
| "Burgundy"
|-
|-
|0x003C
| 0x20
|box2-right
| "#FF6600"
| 203
| "Orange"
|-
|-
|0x0040
| 0x21
|box2-bottom
| "#FF6048"
| 234
| "Coral"
|-
|-
|0x0044
| 0x22
|box3-left
| "#B59474"
| 237
| "Umber"
|-
|-
|0x0048
| 0x23
|box3-top
| "#FDF5B5"
| 210
| "Pale Yellow"
|-
|-
|0x004C
| 0x24
|box3-right
| "#F5DB8B"
| 238
| "Blond"
|-
|-
|0x0050
| 0x25
|box3-bottom
| "#C79732"
| 272
| "Old Gold"
|-
|-
|0x0054
| 0x26
|box4-left
| "#889B9B"
| 221
| "Gray"
|-
|-
|0x0058
| 0x27
|box4-top
| "#AB5A96"
| 208
| "Purple"
|-
|-
|0x005C
| 0x28
|box4-right
| "#FFBDE3"
| 240
| "Orchid Pink"
|-
|-
|0x0060
| 0x29
|box4-bottom
| "#C3007E"
| 241
| "Peony Purple"
|-
|-
|0x0064
| 0x2a
|box5-left
| "#FF0000"
| 225
| "Red"
|-
|-
|0x0068
| 0x2b
|box5-top
| "#EE71AF"
| 266
| "Floral Pink"
|-
|-
|0x006C
| 0x2c
|box5-right
| "#608541"
| 246
| "Moss Green"
|-
|-
|0x0070
| 0x2d
|box5-bottom
| "#609418"
| 247
| "Meadow Green"
|-
|-
|0x0074
| 0x2e
|thread-colour-table, domain: 0x01 - 0x4e -- there are **79** colours in the Janome catalogue
| "#C6EECB"
| 245
| "Opal Green"
|-
|-
| +
| 0x2f
|Thread-load-count * 4
| "#5BD2B5"
| 249
| "Aquamarine"
|-
|-
| +
| 0x30
|0x0000 thread-type-table, domain: 0xd
| "#FFFF17"
| 204
| "Yellow"
|-
|-
| +
| 0x31
|Thread-load-count * 4
| "#04917B"
| 251
| "Peacock Green"
|-
|-
| +
| 0x32
|0x0000 jef plus zero
| "#5C2625"
| 260
| "Dark Sepia"
|-
|-
| +
| 0x33
|0x0004 jef plus zero
| "#FFFFDC"
| 253
| "Ivory White"
|-
|-
| +
| 0x34
|0x0008 jef plus "JANO"
| "#FF5A27"
| 235
| "Burnt Orange"
|-
|-
| +
| 0x35
|0x000C jef plus "ME"
| "#A76C3D"
| 257
| "Cocoa Brown"
|-
|-
| +
| 0x36
|0x0010 jef plus bitmap-count (may be)
| "#9C6445"
| 214
| "Brown"
|-
|-
| +
| 0x37
|0x0014 jef plus bitmap-start offset
| "#B45A30"
| 258
| "Sienna"
|-
|-
|...
| 0x38
|
| "#481A05"
| 205
| "Dark Brown"
|-
|-
|Stitch-
| 0x39
|start stitch-table pairs of signed 8bit values, either 0x80 and command or dx and dy
| "#0C8918"
| 269
| "Meadow"
|-
|-
|...
| 0x3a
|
| "#70A9E2"
| 230
| "Bright Blue"
|-
|-
|bitmap-
| 0x3b
|start jef plus bitmap
| "#1D5478"
| 231
| "Slate Blue"
|-
| 0x3c
| "#165FA7"
| 263
| "Solar Blue"
|-
| 0x3d
| "#7FC21C"
| 218
| "Yellow Green"
|-
| 0x3e
| "#06480D"
| 248
| "Dark Green"
|-
| 0x3f
| "#843154"
| 267
| "Wine"
|-
| 0x40
| "#FD33A3"
| 265
| "Crimson"
|-
| 0x41
| "#FFBBBB"
| 233
| "Salmon Pink"
|-
| 0x42
| "#F7F297"
| 270
| "Mustard"
|-
| 0x43
| "#00B552"
| 206
| "Bright Green"
|-
| 0x44
| "#FCF121"
| 275
| "Canary Yellow"
|-
| 0x45
| "#E6965A"
| 255
| "Toast"
|-
| 0x46
| "#D7BDA4"
| 213
| "Beige"
|-
| 0x47
| "#FF9D00"
| 273
| "Honey Dew"
|-
| 0x48
| "#FFBA5E"
| 274
| "Tangerine"
|-
| 0x49
| "#0257B5"
| 222
| "Ocean Blue"
|-
| 0x4a
| "#6E3937"
| 259
| "Sepia"
|-
| 0x4b
| "#540571"
| 243
| "Royal Purple"
|-
| 0x4c
| "#CC9900"
| 271
| "Yellow Ocher"
|-
| 0x4d
| "#D0BAB0"
| 223
| "Beige Gray"
|-
| 0x4e
| "#E3BE81"
| 224
| "Bamboo"
|}
|}
===Thread-type===
{| class="wikitable"
| Offset
| Length
| Type
| Description
|-
| 0
| 4
| int
| unknown = 13
|}
===Plus-header===
Only in JEF+ files.
{| class="wikitable"
| Offset
| Length
| Type
| Description
|-
| 0
| 4
| int
| Signature-1 = 0
|-
| 4
| 4
| int
| Signature-2 = 0
|-
| 8
| 8
| ASCII
| Signature-3 = "JANOME\0\0"
|-
| 16
| 4
| Count
| Plus-detail-count = 1
|-
| 20
| 4
| Offset
| Plus-detail-offset from file-start to JEF+ extra details
|}
===Escaped-command===
{| class="wikitable"
| Offset
| Length
| Type
| Description
|-
| 0
| 1
| Byte
| Escape = -128 or 0x80
|-
| 1
| 1
| Byte
| Command-code = 1, 2 or 16
|}
{| class="wikitable"
| Command-code
| Description
|-
| 1
| Change to next thread in list
|-
| 2
| Move followed by 8 bit displacement-X and 8 bit displacement-Y
|-
| 16
| Last-stitch
|}
===Displacement===
{| class="wikitable"
| Offset
| Length
| Type
| Description
|-
| 0
| 1
| Byte
| Displacement-X -127 to 127 in 0.1 mm
|-
| 1
| 1
| Byte
| Displacement-Y -127 to 127 in 0.1 mm
|}
===Plus-detail===
Unknown, many 32 bit numbers, then many 16 bit numbers.





Revision as of 21:26, 8 August 2012

Jamone Embroidery Format JEF

The JEF and JEF+ files consists of a number of sections. Multi-byte numbers appear to be stored little endian. For the JEF (and not JEF+ ) files, there is no simple signature, except to see if the Stitch-offset is after the Thread-type-list.

File =

 File-header
 Thread-colour-list
 Thread-type-list
 [Plus-header]
 Stitch-list
 {Plus-detail}

Thread-colour-list = {Thread-colour}

Thread-type-list = {Thread-type}

Stitch-list = {Stitch}

Stitch = Escaped-command | Displacement

File-header

Offset Length Type Description
0 4 Offset Stitch-offset location of first stitch
4 4 Flags unknown = 1, 10 or 20
8 8 ASCII Date YYYYMMDD
16 8 ASCII Time HHMMSSxx
24 4 Count Thread-count number of thread changes
28 4 Count Stitch-count
32 4 Code Hoop-code = 0 to 4
36 4 Measure Extent-1-left stitch extent left of centre in 0.1 mm units
40 4 Measure Extent-1-top
44 4 Measure Extent-1-right
48 4 Measure Extent-1-bottom
52 4 Measure Extent-2-left -1 implies not used
56 4 Measure Extent-2-top
60 4 Measure Extent-2-right
64 4 Measure Extent-2-bottom
68 4 Measure Extent-3-left -1 implies not used
72 4 Measure Extent-3-top
76 4 Measure Extent-3-right
80 4 Measure Extent-3-bottom
84 4 Measure Extent-4-left -1 implies not used
88 4 Measure Extent-4-top
92 4 Measure Extent-4-right
96 4 Measure Extent-4-bottom
100 4 Measure Extent-5-left -1 implies not used
104 4 Measure Extent-5-top
108 4 Measure Extent-5-right
112 4 Measure Extent-5-bottom


Hoop-code Hoop-name Hoop-size
0 A 128 x 110 mm
1 C 50 x 50 mm
2 B 140 x 200 mm
3 F 126 x 110 mm
4 D 230 x 200 mm

Thread-colour

Offset Length Type Description
0 4 Code Thread-code = 1 to 78


Thread-code Colour-RGB Colour-number Colour-name
0x01 "#000000" 2 "Black"
0x02 "#F0F0F0" 1 "White"
0x03 "#FFCC00" 239 "Sunflower"
0x04 "#E6651E" 254 "Hazel"
0x05 "#C4E39D" 264 "Green Dust"
0x06 "#237336" 226 "Green"
0x07 "#071650" 232 "Navy Blue"
0x08 "#4CB58F" 250 "Emerald Green"
0x09 "#F669A0" 201 "Pink"
0x0a "#FF4720" 202 "Vermilion"
0x0b "#E2A188" 236 "Cinnamon"
0x0c "#595B61" 252 "Dark Gray"
0x0d "#E4C35D" 3 "Gold"
0x0e "#6231BD" 261 "Violet Blue"
0x0f "#2F5933" 219 "Olive Green"
0x10 "#FAB381" 212 "Peach"
0x11 "#F999B7" 211 "Pale Pink"
0x12 "#F09C96" 256 "Salmon"
0x13 "#A39166" 268 "Olive Drab"
0x14 "#970533" 215 "Wine Red"
0x15 "#AC9CC7" 209 "Pale Violet"
0x16 "#65C2C8" 217 "Sky"
0x17 "#E5E5E5" 220 "Silver Gray"
0x18 "#A0B8CC" 216 "Pale Sky"
0x19 "#98D6BD" 227 "Pale Aqua"
0x1a "#0B2F84" 207 "Blue"
0x1b "#98F3FE" 229 "Powder Blue"
0x1c "#B2E1E3" 228 "Baby Blue"
0x1d "#FF0927" 244 "Cardinal Red"
0x1e "#14329C" 262 "Blue Ink"
0x1f "#A80043" 242 "Burgundy"
0x20 "#FF6600" 203 "Orange"
0x21 "#FF6048" 234 "Coral"
0x22 "#B59474" 237 "Umber"
0x23 "#FDF5B5" 210 "Pale Yellow"
0x24 "#F5DB8B" 238 "Blond"
0x25 "#C79732" 272 "Old Gold"
0x26 "#889B9B" 221 "Gray"
0x27 "#AB5A96" 208 "Purple"
0x28 "#FFBDE3" 240 "Orchid Pink"
0x29 "#C3007E" 241 "Peony Purple"
0x2a "#FF0000" 225 "Red"
0x2b "#EE71AF" 266 "Floral Pink"
0x2c "#608541" 246 "Moss Green"
0x2d "#609418" 247 "Meadow Green"
0x2e "#C6EECB" 245 "Opal Green"
0x2f "#5BD2B5" 249 "Aquamarine"
0x30 "#FFFF17" 204 "Yellow"
0x31 "#04917B" 251 "Peacock Green"
0x32 "#5C2625" 260 "Dark Sepia"
0x33 "#FFFFDC" 253 "Ivory White"
0x34 "#FF5A27" 235 "Burnt Orange"
0x35 "#A76C3D" 257 "Cocoa Brown"
0x36 "#9C6445" 214 "Brown"
0x37 "#B45A30" 258 "Sienna"
0x38 "#481A05" 205 "Dark Brown"
0x39 "#0C8918" 269 "Meadow"
0x3a "#70A9E2" 230 "Bright Blue"
0x3b "#1D5478" 231 "Slate Blue"
0x3c "#165FA7" 263 "Solar Blue"
0x3d "#7FC21C" 218 "Yellow Green"
0x3e "#06480D" 248 "Dark Green"
0x3f "#843154" 267 "Wine"
0x40 "#FD33A3" 265 "Crimson"
0x41 "#FFBBBB" 233 "Salmon Pink"
0x42 "#F7F297" 270 "Mustard"
0x43 "#00B552" 206 "Bright Green"
0x44 "#FCF121" 275 "Canary Yellow"
0x45 "#E6965A" 255 "Toast"
0x46 "#D7BDA4" 213 "Beige"
0x47 "#FF9D00" 273 "Honey Dew"
0x48 "#FFBA5E" 274 "Tangerine"
0x49 "#0257B5" 222 "Ocean Blue"
0x4a "#6E3937" 259 "Sepia"
0x4b "#540571" 243 "Royal Purple"
0x4c "#CC9900" 271 "Yellow Ocher"
0x4d "#D0BAB0" 223 "Beige Gray"
0x4e "#E3BE81" 224 "Bamboo"

Thread-type

Offset Length Type Description
0 4 int unknown = 13

Plus-header

Only in JEF+ files.

Offset Length Type Description
0 4 int Signature-1 = 0
4 4 int Signature-2 = 0
8 8 ASCII Signature-3 = "JANOME\0\0"
16 4 Count Plus-detail-count = 1
20 4 Offset Plus-detail-offset from file-start to JEF+ extra details

Escaped-command

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


Command-code Description
1 Change to next thread in list
2 Move followed by 8 bit displacement-X and 8 bit displacement-Y
16 Last-stitch

Displacement

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


Plus-detail

Unknown, many 32 bit numbers, then many 16 bit numbers.