{
 "last_node_id": 18,
 "last_link_id": 15,
 "nodes": [
  {
   "id": 1,
   "type": "MarkdownNote",
   "pos": [
    0,
    -460.0
   ],
   "size": [
    640,
    290
   ],
   "flags": {},
   "order": 1,
   "mode": 0,
   "inputs": [],
   "outputs": [],
   "properties": {},
   "widgets_values": [
    "**Needs in ComfyUI's `input` folder:** `codes_single.png`, `codes_long.png`\n\nScan codes finds barcodes and 2D codes (QR, Data Matrix, EAN / UPC, Code 128 ...) on the CPU (tapirscan: pip install tapirscan): the preview outlines them, codes holds text, format and corners, first the first text. Top: one label (codes_single.png). Below: a long page (codes_long.png, 1400 x 3600) is scanned whole, the node has no tiling and reads at full resolution; the two overlapping crops (ImageCrop) show how to scan parts of a huge page or scan with a higher effort only where codes are tiny. formats = 1D / 2D / retail narrows the search and is faster."
   ]
  },
  {
   "id": 2,
   "type": "LoadImage",
   "pos": [
    0.0,
    0.0
   ],
   "size": [
    300,
    340
   ],
   "flags": {},
   "order": 2,
   "mode": 0,
   "inputs": [],
   "outputs": [
    {
     "name": "IMAGE",
     "type": "IMAGE",
     "links": [
      1
     ],
     "slot_index": 0
    },
    {
     "name": "MASK",
     "type": "MASK",
     "links": [],
     "slot_index": 1
    }
   ],
   "properties": {},
   "widgets_values": [
    "codes_single.png",
    "image"
   ]
  },
  {
   "id": 3,
   "type": "FastforksScanCodes",
   "pos": [
    540.0,
    0.0
   ],
   "size": [
    330,
    230
   ],
   "flags": {},
   "order": 3,
   "mode": 0,
   "inputs": [
    {
     "name": "image",
     "type": "IMAGE",
     "link": 1
    }
   ],
   "outputs": [
    {
     "name": "preview",
     "type": "IMAGE",
     "links": [
      2
     ],
     "slot_index": 0
    },
    {
     "name": "codes",
     "type": "STRING",
     "links": [
      3
     ],
     "slot_index": 1
    },
    {
     "name": "first",
     "type": "STRING",
     "links": [
      4
     ],
     "slot_index": 2
    }
   ],
   "properties": {},
   "widgets_values": [
    "common",
    "medium",
    3
   ]
  },
  {
   "id": 4,
   "type": "PreviewImage",
   "pos": [
    950.0,
    0.0
   ],
   "size": [
    300,
    300
   ],
   "flags": {},
   "order": 4,
   "mode": 0,
   "inputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "link": 2
    }
   ],
   "outputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "links": [],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  },
  {
   "id": 5,
   "type": "PreviewAny",
   "pos": [
    950.0,
    340.0
   ],
   "size": [
    300,
    200
   ],
   "flags": {},
   "order": 5,
   "mode": 0,
   "inputs": [
    {
     "name": "source",
     "type": "*",
     "link": 3
    }
   ],
   "outputs": [
    {
     "name": "STRING",
     "type": "STRING",
     "links": [],
     "slot_index": 0
    }
   ],
   "properties": {},
   "title": "codes",
   "widgets_values": []
  },
  {
   "id": 6,
   "type": "PreviewAny",
   "pos": [
    950.0,
    580.0
   ],
   "size": [
    300,
    100
   ],
   "flags": {},
   "order": 6,
   "mode": 0,
   "inputs": [
    {
     "name": "source",
     "type": "*",
     "link": 4
    }
   ],
   "outputs": [
    {
     "name": "STRING",
     "type": "STRING",
     "links": [],
     "slot_index": 0
    }
   ],
   "properties": {},
   "title": "first",
   "widgets_values": []
  },
  {
   "id": 7,
   "type": "LoadImage",
   "pos": [
    0.0,
    500.0
   ],
   "size": [
    300,
    340
   ],
   "flags": {},
   "order": 7,
   "mode": 0,
   "inputs": [],
   "outputs": [
    {
     "name": "IMAGE",
     "type": "IMAGE",
     "links": [
      5,
      8,
      12
     ],
     "slot_index": 0
    },
    {
     "name": "MASK",
     "type": "MASK",
     "links": [],
     "slot_index": 1
    }
   ],
   "properties": {},
   "widgets_values": [
    "codes_long.png",
    "image"
   ]
  },
  {
   "id": 8,
   "type": "FastforksScanCodes",
   "pos": [
    540.0,
    500.0
   ],
   "size": [
    330,
    230
   ],
   "flags": {},
   "order": 8,
   "mode": 0,
   "inputs": [
    {
     "name": "image",
     "type": "IMAGE",
     "link": 5
    }
   ],
   "outputs": [
    {
     "name": "preview",
     "type": "IMAGE",
     "links": [
      6
     ],
     "slot_index": 0
    },
    {
     "name": "codes",
     "type": "STRING",
     "links": [
      7
     ],
     "slot_index": 1
    },
    {
     "name": "first",
     "type": "STRING",
     "links": [],
     "slot_index": 2
    }
   ],
   "properties": {},
   "title": "whole page",
   "widgets_values": [
    "common",
    "medium",
    3
   ]
  },
  {
   "id": 9,
   "type": "PreviewImage",
   "pos": [
    950.0,
    720.0
   ],
   "size": [
    300,
    300
   ],
   "flags": {},
   "order": 9,
   "mode": 0,
   "inputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "link": 6
    }
   ],
   "outputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "links": [],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  },
  {
   "id": 10,
   "type": "PreviewAny",
   "pos": [
    950.0,
    1060.0
   ],
   "size": [
    300,
    200
   ],
   "flags": {},
   "order": 10,
   "mode": 0,
   "inputs": [
    {
     "name": "source",
     "type": "*",
     "link": 7
    }
   ],
   "outputs": [
    {
     "name": "STRING",
     "type": "STRING",
     "links": [],
     "slot_index": 0
    }
   ],
   "properties": {},
   "title": "codes",
   "widgets_values": []
  },
  {
   "id": 11,
   "type": "ImageCrop",
   "pos": [
    540.0,
    1000.0
   ],
   "size": [
    330,
    130
   ],
   "flags": {},
   "order": 11,
   "mode": 0,
   "inputs": [
    {
     "name": "image",
     "type": "IMAGE",
     "link": 8
    }
   ],
   "outputs": [
    {
     "name": "IMAGE",
     "type": "IMAGE",
     "links": [
      9
     ],
     "slot_index": 0
    }
   ],
   "properties": {},
   "title": "crop 1",
   "widgets_values": [
    1400,
    2100,
    0,
    0
   ]
  },
  {
   "id": 12,
   "type": "FastforksScanCodes",
   "pos": [
    950.0,
    1300.0
   ],
   "size": [
    330,
    230
   ],
   "flags": {},
   "order": 12,
   "mode": 0,
   "inputs": [
    {
     "name": "image",
     "type": "IMAGE",
     "link": 9
    }
   ],
   "outputs": [
    {
     "name": "preview",
     "type": "IMAGE",
     "links": [
      10
     ],
     "slot_index": 0
    },
    {
     "name": "codes",
     "type": "STRING",
     "links": [
      11
     ],
     "slot_index": 1
    },
    {
     "name": "first",
     "type": "STRING",
     "links": [],
     "slot_index": 2
    }
   ],
   "properties": {},
   "title": "crop 1",
   "widgets_values": [
    "common",
    "high",
    3
   ]
  },
  {
   "id": 13,
   "type": "PreviewImage",
   "pos": [
    1360.0,
    1000.0
   ],
   "size": [
    300,
    300
   ],
   "flags": {},
   "order": 13,
   "mode": 0,
   "inputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "link": 10
    }
   ],
   "outputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "links": [],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  },
  {
   "id": 14,
   "type": "PreviewAny",
   "pos": [
    1360.0,
    1340.0
   ],
   "size": [
    300,
    200
   ],
   "flags": {},
   "order": 14,
   "mode": 0,
   "inputs": [
    {
     "name": "source",
     "type": "*",
     "link": 11
    }
   ],
   "outputs": [
    {
     "name": "STRING",
     "type": "STRING",
     "links": [],
     "slot_index": 0
    }
   ],
   "properties": {},
   "title": "codes",
   "widgets_values": []
  },
  {
   "id": 15,
   "type": "ImageCrop",
   "pos": [
    540.0,
    1420.0
   ],
   "size": [
    330,
    130
   ],
   "flags": {},
   "order": 15,
   "mode": 0,
   "inputs": [
    {
     "name": "image",
     "type": "IMAGE",
     "link": 12
    }
   ],
   "outputs": [
    {
     "name": "IMAGE",
     "type": "IMAGE",
     "links": [
      13
     ],
     "slot_index": 0
    }
   ],
   "properties": {},
   "title": "crop 2",
   "widgets_values": [
    1400,
    2100,
    0,
    1500
   ]
  },
  {
   "id": 16,
   "type": "FastforksScanCodes",
   "pos": [
    950.0,
    1570.0
   ],
   "size": [
    330,
    230
   ],
   "flags": {},
   "order": 16,
   "mode": 0,
   "inputs": [
    {
     "name": "image",
     "type": "IMAGE",
     "link": 13
    }
   ],
   "outputs": [
    {
     "name": "preview",
     "type": "IMAGE",
     "links": [
      14
     ],
     "slot_index": 0
    },
    {
     "name": "codes",
     "type": "STRING",
     "links": [
      15
     ],
     "slot_index": 1
    },
    {
     "name": "first",
     "type": "STRING",
     "links": [],
     "slot_index": 2
    }
   ],
   "properties": {},
   "title": "crop 2",
   "widgets_values": [
    "common",
    "high",
    3
   ]
  },
  {
   "id": 17,
   "type": "PreviewImage",
   "pos": [
    1360.0,
    1580.0
   ],
   "size": [
    300,
    300
   ],
   "flags": {},
   "order": 17,
   "mode": 0,
   "inputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "link": 14
    }
   ],
   "outputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "links": [],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  },
  {
   "id": 18,
   "type": "PreviewAny",
   "pos": [
    1360.0,
    1920.0
   ],
   "size": [
    300,
    200
   ],
   "flags": {},
   "order": 18,
   "mode": 0,
   "inputs": [
    {
     "name": "source",
     "type": "*",
     "link": 15
    }
   ],
   "outputs": [
    {
     "name": "STRING",
     "type": "STRING",
     "links": [],
     "slot_index": 0
    }
   ],
   "properties": {},
   "title": "codes",
   "widgets_values": []
  }
 ],
 "links": [
  [
   1,
   2,
   0,
   3,
   0,
   "IMAGE"
  ],
  [
   2,
   3,
   0,
   4,
   0,
   "IMAGE"
  ],
  [
   3,
   3,
   1,
   5,
   0,
   "*"
  ],
  [
   4,
   3,
   2,
   6,
   0,
   "*"
  ],
  [
   5,
   7,
   0,
   8,
   0,
   "IMAGE"
  ],
  [
   6,
   8,
   0,
   9,
   0,
   "IMAGE"
  ],
  [
   7,
   8,
   1,
   10,
   0,
   "*"
  ],
  [
   8,
   7,
   0,
   11,
   0,
   "IMAGE"
  ],
  [
   9,
   11,
   0,
   12,
   0,
   "IMAGE"
  ],
  [
   10,
   12,
   0,
   13,
   0,
   "IMAGE"
  ],
  [
   11,
   12,
   1,
   14,
   0,
   "*"
  ],
  [
   12,
   7,
   0,
   15,
   0,
   "IMAGE"
  ],
  [
   13,
   15,
   0,
   16,
   0,
   "IMAGE"
  ],
  [
   14,
   16,
   0,
   17,
   0,
   "IMAGE"
  ],
  [
   15,
   16,
   1,
   18,
   0,
   "*"
  ]
 ],
 "groups": [
  {
   "id": 1,
   "title": "Inputs",
   "bounding": [
    -30.0,
    -90.0,
    360.0,
    960.0
   ],
   "color": "#88A",
   "font_size": 24,
   "flags": {}
  },
  {
   "id": 2,
   "title": "fastforks",
   "bounding": [
    510.0,
    -90.0,
    1180.0,
    2240.0
   ],
   "color": "#3f789e",
   "font_size": 24,
   "flags": {}
  }
 ],
 "config": {},
 "extra": {},
 "version": 0.4
}