rxing-wasm 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/rxing_wasm.d.ts CHANGED
@@ -1,498 +1,402 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
- * Encode a barcode with the given data, dimensions, and type
5
- * @param {string} data
6
- * @param {number} width
7
- * @param {number} height
8
- * @param {BarcodeFormat} bc_type
9
- * @returns {string}
10
- */
4
+ * Encode a barcode with the given data, dimensions, and type
5
+ */
11
6
  export function encode_barcode(data: string, width: number, height: number, bc_type: BarcodeFormat): string;
12
7
  /**
13
- * Encode a barcode with the given data, dimensions, and type, use the given encoding hints
14
- * @param {string} data
15
- * @param {number} width
16
- * @param {number} height
17
- * @param {BarcodeFormat} bc_type
18
- * @param {EncodeHintDictionary} hints
19
- * @returns {string}
20
- */
8
+ * Encode a barcode with the given data, dimensions, and type, use the given encoding hints
9
+ */
21
10
  export function encode_barcode_with_hints(data: string, width: number, height: number, bc_type: BarcodeFormat, hints: EncodeHintDictionary): string;
22
11
  /**
23
- * Decode a barcode from an array of 8bit luma data
24
- * @param {Uint8Array} data
25
- * @param {number} width
26
- * @param {number} height
27
- * @param {boolean | undefined} [try_harder]
28
- * @param {boolean | undefined} [filter_image]
29
- * @returns {BarcodeResult}
30
- */
12
+ * Decode a barcode from an array of 8bit luma data
13
+ */
31
14
  export function decode_barcode(data: Uint8Array, width: number, height: number, try_harder?: boolean, filter_image?: boolean): BarcodeResult;
32
15
  /**
33
- * Convert a javascript image context's data into luma 8.
34
- *
35
- * Data for this function can be found from any canvas object
36
- * using the `data` property of an `ImageData` object.
37
- * Such an object could be obtained using the `getImageData`
38
- * method of a `CanvasRenderingContext2D` object.
39
- * @param {Uint8Array} data
40
- * @returns {Uint8Array}
41
- */
16
+ * Convert a javascript image context's data into luma 8.
17
+ *
18
+ * Data for this function can be found from any canvas object
19
+ * using the `data` property of an `ImageData` object.
20
+ * Such an object could be obtained using the `getImageData`
21
+ * method of a `CanvasRenderingContext2D` object.
22
+ */
42
23
  export function convert_js_image_to_luma(data: Uint8Array): Uint8Array;
24
+ export function convert_canvas_to_luma(canvas: HTMLCanvasElement): Uint8Array;
25
+ export function convert_imagedata_to_luma(image_data: ImageData): Uint8Array;
43
26
  /**
44
- * Decode a barcode from an array of rgba data.
45
- * Pixel data is in the form of:
46
- * Each pixel is one u32, [r,g,b].
47
- * @param {Uint32Array} data
48
- * @param {number} width
49
- * @param {number} height
50
- * @param {boolean | undefined} [try_harder]
51
- * @returns {BarcodeResult}
52
- */
27
+ * Decode a barcode from an array of rgba data.
28
+ * Pixel data is in the form of:
29
+ * Each pixel is one u32, [r,g,b].
30
+ */
53
31
  export function decode_barcode_rgb(data: Uint32Array, width: number, height: number, try_harder?: boolean): BarcodeResult;
54
- /**
55
- * @param {Uint8Array} data
56
- * @param {number} width
57
- * @param {number} height
58
- * @param {DecodeHintDictionary} hints
59
- * @param {boolean | undefined} [filter_image]
60
- * @returns {BarcodeResult}
61
- */
62
32
  export function decode_barcode_with_hints(data: Uint8Array, width: number, height: number, hints: DecodeHintDictionary, filter_image?: boolean): BarcodeResult;
63
- /**
64
- * @param {Uint8Array} data
65
- * @param {number} width
66
- * @param {number} height
67
- * @param {DecodeHintDictionary} hints
68
- * @param {boolean | undefined} [filter_image]
69
- * @returns {(BarcodeResult)[]}
70
- */
71
33
  export function decode_multi(data: Uint8Array, width: number, height: number, hints: DecodeHintDictionary, filter_image?: boolean): (BarcodeResult)[];
72
34
  /**
73
- */
74
- export enum EncodeHintTypes {
75
- /**
76
- *
77
- * * Specifies what degree of error correction to use, for example in QR Codes.
78
- * * Type depends on the encoder. For example for QR codes it's type
79
- * * {@link com.google.zxing.qrcode.decoder.ErrorCorrectionLevel ErrorCorrectionLevel}.
80
- * * For Aztec it is of type {@link Integer}, representing the minimal percentage of error correction words.
81
- * * For PDF417 it is of type {@link Integer}, valid values being 0 to 8.
82
- * * In all cases, it can also be a {@link String} representation of the desired value as well.
83
- * * Note: an Aztec symbol should have a minimum of 25% EC words.
84
- *
85
- */
86
- ErrorCorrection = 0,
87
- /**
88
- *
89
- * * Specifies what character encoding to use where applicable (type {@link String})
90
- *
91
- */
92
- CharacterSet = 1,
93
- /**
94
- *
95
- * * Specifies the matrix shape for Data Matrix (type {@link com.google.zxing.datamatrix.encoder.SymbolShapeHint})
96
- *
97
- */
98
- DataMatrixShape = 2,
99
- /**
100
- *
101
- * * Specifies whether to use compact mode for Data Matrix (type {@link Boolean}, or "true" or "false"
102
- * * {@link String } value).
103
- * * The compact encoding mode also supports the encoding of characters that are not in the ISO-8859-1
104
- * * character set via ECIs.
105
- * * Please note that in that case, the most compact character encoding is chosen for characters in
106
- * * the input that are not in the ISO-8859-1 character set. Based on experience, some scanners do not
107
- * * support encodings like cp-1256 (Arabic). In such cases the encoding can be forced to UTF-8 by
108
- * * means of the {@link #CHARACTER_SET} encoding hint.
109
- * * Compact encoding also provides GS1-FNC1 support when {@link #GS1_FORMAT} is selected. In this case
110
- * * group-separator character (ASCII 29 decimal) can be used to encode the positions of FNC1 codewords
111
- * * for the purpose of delimiting AIs.
112
- * * This option and {@link #FORCE_C40} are mutually exclusive.
113
- *
114
- */
115
- DataMatrixCompact = 3,
116
- /**
117
- *
118
- * * Specifies a minimum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.
119
- * *
120
- * * @deprecated use width/height params in
121
- * * {@link com.google.zxing.datamatrix.DataMatrixWriter#encode(String, BarcodeFormat, int, int)}
122
- *
123
- */
124
- MinSize = 4,
125
- /**
126
- *
127
- * * Specifies a maximum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.
128
- * *
129
- * * @deprecated without replacement
130
- *
131
- */
132
- MaxSize = 5,
133
- /**
134
- *
135
- * * Specifies margin, in pixels, to use when generating the barcode. The meaning can vary
136
- * * by format; for example it controls margin before and after the barcode horizontally for
137
- * * most 1D formats. (Type {@link Integer}, or {@link String} representation of the integer value).
138
- *
139
- */
140
- MARGIN = 6,
141
- /**
142
- *
143
- * * Specifies whether to use compact mode for PDF417 (type {@link Boolean}, or "true" or "false"
144
- * * {@link String} value).
145
- *
146
- */
147
- Pdf417Compact = 7,
148
- /**
149
- *
150
- * * Specifies what compaction mode to use for PDF417 (type
151
- * * {@link com.google.zxing.pdf417.encoder.Compaction Compaction} or {@link String} value of one of its
152
- * * enum values).
153
- *
154
- */
155
- Pdf417Compaction = 8,
156
- /**
157
- *
158
- * * Specifies the minimum and maximum number of rows and columns for PDF417 (type
159
- * * {@link com.google.zxing.pdf417.encoder.Dimensions Dimensions}).
160
- *
161
- */
162
- Pdf417Dimensions = 9,
163
- /**
164
- *
165
- * * Specifies whether to automatically insert ECIs when encoding PDF417 (type {@link Boolean}, or "true" or "false"
166
- * * {@link String} value).
167
- * * Please note that in that case, the most compact character encoding is chosen for characters in
168
- * * the input that are not in the ISO-8859-1 character set. Based on experience, some scanners do not
169
- * * support encodings like cp-1256 (Arabic). In such cases the encoding can be forced to UTF-8 by
170
- * * means of the {@link #CHARACTER_SET} encoding hint.
171
- *
172
- */
173
- Pdf417AutoEci = 10,
174
- /**
175
- *
176
- * * Specifies the required number of layers for an Aztec code.
177
- * * A negative number (-1, -2, -3, -4) specifies a compact Aztec code.
178
- * * 0 indicates to use the minimum number of layers (the default).
179
- * * A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code.
180
- * * (Type {@link Integer}, or {@link String} representation of the integer value).
181
- *
182
- */
183
- AztecLayers = 11,
184
- /**
185
- *
186
- * * Specifies the exact version of QR code to be encoded.
187
- * * (Type {@link Integer}, or {@link String} representation of the integer value).
188
- *
189
- */
190
- QrVersion = 12,
191
- /**
192
- *
193
- * * Specifies the QR code mask pattern to be used. Allowed values are
194
- * * 0..QRCode.NUM_MASK_PATTERNS-1. By default the code will automatically select
195
- * * the optimal mask pattern.
196
- * * * (Type {@link Integer}, or {@link String} representation of the integer value).
197
- *
198
- */
199
- QrMaskPattern = 13,
200
- /**
201
- *
202
- * * Specifies whether to use compact mode for QR code (type {@link Boolean}, or "true" or "false"
203
- * * {@link String } value).
204
- * * Please note that when compaction is performed, the most compact character encoding is chosen
205
- * * for characters in the input that are not in the ISO-8859-1 character set. Based on experience,
206
- * * some scanners do not support encodings like cp-1256 (Arabic). In such cases the encoding can
207
- * * be forced to UTF-8 by means of the {@link #CHARACTER_SET} encoding hint.
208
- *
209
- */
210
- QrCompact = 14,
211
- /**
212
- *
213
- * * Specifies whether the data should be encoded to the GS1 standard (type {@link Boolean}, or "true" or "false"
214
- * * {@link String } value).
215
- *
216
- */
217
- Gs1Format = 15,
218
- /**
219
- *
220
- * * Forces which encoding will be used. Currently only used for Code-128 code sets (Type {@link String}).
221
- * * Valid values are "A", "B", "C".
222
- * * This option and {@link #CODE128_COMPACT} are mutually exclusive.
223
- *
224
- */
225
- ForceCodeSet = 16,
226
- /**
227
- *
228
- * * Forces C40 encoding for data-matrix (type {@link Boolean}, or "true" or "false") {@link String } value). This
229
- * * option and {@link #DATA_MATRIX_COMPACT} are mutually exclusive.
230
- *
231
- */
232
- ForceC40 = 17,
233
- /**
234
- *
235
- * * Specifies whether to use compact mode for Code-128 code (type {@link Boolean}, or "true" or "false"
236
- * * {@link String } value).
237
- * * This can yield slightly smaller bar codes. This option and {@link #FORCE_CODE_SET} are mutually
238
- * * exclusive.
239
- *
240
- */
241
- Code128Compact = 18,
242
- TelepenAsNumeric = 19,
243
- }
244
- /**
245
- * Available barcode types
246
- */
35
+ * Available barcode types
36
+ */
247
37
  export enum BarcodeFormat {
248
- /**
249
- * Aztec 2D barcode format.
250
- */
38
+ /**
39
+ * Aztec 2D barcode format.
40
+ */
251
41
  AZTEC = 0,
252
- /**
253
- * CODABAR 1D format.
254
- */
42
+ /**
43
+ * CODABAR 1D format.
44
+ */
255
45
  CODABAR = 1,
256
- /**
257
- * Code 39 1D format.
258
- */
46
+ /**
47
+ * Code 39 1D format.
48
+ */
259
49
  Code39 = 2,
260
- /**
261
- * Code 93 1D format.
262
- */
50
+ /**
51
+ * Code 93 1D format.
52
+ */
263
53
  Code93 = 3,
264
- /**
265
- * Code 128 1D format.
266
- */
54
+ /**
55
+ * Code 128 1D format.
56
+ */
267
57
  Code128 = 4,
268
- /**
269
- * Data Matrix 2D barcode format.
270
- */
58
+ /**
59
+ * Data Matrix 2D barcode format.
60
+ */
271
61
  DataMatrix = 5,
272
- /**
273
- * EAN-8 1D format.
274
- */
62
+ /**
63
+ * EAN-8 1D format.
64
+ */
275
65
  Ean8 = 6,
276
- /**
277
- * EAN-13 1D format.
278
- */
66
+ /**
67
+ * EAN-13 1D format.
68
+ */
279
69
  Ean13 = 7,
280
- /**
281
- * ITF (Interleaved Two of Five) 1D format.
282
- */
70
+ /**
71
+ * ITF (Interleaved Two of Five) 1D format.
72
+ */
283
73
  ITF = 8,
284
- /**
285
- * MaxiCode 2D barcode format.
286
- */
74
+ /**
75
+ * MaxiCode 2D barcode format.
76
+ */
287
77
  MAXICODE = 9,
288
- /**
289
- * PDF417 format.
290
- */
78
+ /**
79
+ * PDF417 format.
80
+ */
291
81
  Pdf417 = 10,
292
- /**
293
- * QR Code 2D barcode format.
294
- */
82
+ /**
83
+ * QR Code 2D barcode format.
84
+ */
295
85
  QrCode = 11,
296
- /**
297
- * RSS 14
298
- */
86
+ /**
87
+ * RSS 14
88
+ */
299
89
  Rss14 = 12,
300
- /**
301
- * RSS EXPANDED
302
- */
90
+ /**
91
+ * RSS EXPANDED
92
+ */
303
93
  RssExpanded = 13,
304
- /**
305
- * UPC-A 1D format.
306
- */
94
+ /**
95
+ * UPC-A 1D format.
96
+ */
307
97
  UpcA = 14,
308
- /**
309
- * UPC-E 1D format.
310
- */
98
+ /**
99
+ * UPC-E 1D format.
100
+ */
311
101
  UpcE = 15,
312
- /**
313
- * UPC/EAN extension format. Not a stand-alone format.
314
- */
102
+ /**
103
+ * UPC/EAN extension format. Not a stand-alone format.
104
+ */
315
105
  UpcEanExtension = 16,
316
106
  MicroQR = 17,
317
107
  Telepen = 18,
318
108
  RectangularMicroQR = 19,
319
109
  UnsuportedFormat = 20,
320
110
  }
321
- /**
322
- */
323
111
  export enum DecodeHintTypes {
324
- /**
325
- *
326
- * * Unspecified, application-specific hint. Maps to an unspecified {@link Object}.
327
- *
328
- */
112
+ /**
113
+ *
114
+ * * Unspecified, application-specific hint. Maps to an unspecified {@link Object}.
115
+ *
116
+ */
329
117
  Other = 0,
330
- /**
331
- *
332
- * * Image is a pure monochrome image of a barcode. Doesn't matter what it maps to;
333
- * * use {@link Boolean#TRUE}.
334
- *
335
- */
118
+ /**
119
+ *
120
+ * * Image is a pure monochrome image of a barcode. Doesn't matter what it maps to;
121
+ * * use {@link Boolean#TRUE}.
122
+ *
123
+ */
336
124
  PureBarcode = 1,
337
- /**
338
- *
339
- * * Image is known to be of one of a few possible formats.
340
- * * Maps to a {@link List} of {@link BarcodeFormat}s.
341
- *
342
- */
125
+ /**
126
+ *
127
+ * * Image is known to be of one of a few possible formats.
128
+ * * Maps to a {@link List} of {@link BarcodeFormat}s.
129
+ *
130
+ */
343
131
  PossibleFormats = 2,
344
- /**
345
- *
346
- * * Spend more time to try to find a barcode; optimize for accuracy, not speed.
347
- * * Doesn't matter what it maps to; use {@link Boolean#TRUE}.
348
- *
349
- */
132
+ /**
133
+ *
134
+ * * Spend more time to try to find a barcode; optimize for accuracy, not speed.
135
+ * * Doesn't matter what it maps to; use {@link Boolean#TRUE}.
136
+ *
137
+ */
350
138
  TryHarder = 3,
351
- /**
352
- *
353
- * * Specifies what character encoding to use when decoding, where applicable (type String)
354
- *
355
- */
139
+ /**
140
+ *
141
+ * * Specifies what character encoding to use when decoding, where applicable (type String)
142
+ *
143
+ */
356
144
  CharacterSet = 4,
357
- /**
358
- *
359
- * * Allowed lengths of encoded data -- reject anything else. Maps to an {@code int[]}.
360
- *
361
- */
145
+ /**
146
+ *
147
+ * * Allowed lengths of encoded data -- reject anything else. Maps to an {@code int[]}.
148
+ *
149
+ */
362
150
  AllowedLengths = 5,
363
- /**
364
- *
365
- * * Assume Code 39 codes employ a check digit. Doesn't matter what it maps to;
366
- * * use {@link Boolean#TRUE}.
367
- *
368
- */
151
+ /**
152
+ *
153
+ * * Assume Code 39 codes employ a check digit. Doesn't matter what it maps to;
154
+ * * use {@link Boolean#TRUE}.
155
+ *
156
+ */
369
157
  AssumeCode39CheckDigit = 6,
370
- /**
371
- *
372
- * * Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed.
373
- * * For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to;
374
- * * use {@link Boolean#TRUE}.
375
- *
376
- */
158
+ /**
159
+ *
160
+ * * Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed.
161
+ * * For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to;
162
+ * * use {@link Boolean#TRUE}.
163
+ *
164
+ */
377
165
  AssumeGs1 = 7,
378
- /**
379
- *
380
- * * If true, return the start and end digits in a Codabar barcode instead of stripping them. They
381
- * * are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them
382
- * * to not be. Doesn't matter what it maps to; use {@link Boolean#TRUE}.
383
- *
384
- */
166
+ /**
167
+ *
168
+ * * If true, return the start and end digits in a Codabar barcode instead of stripping them. They
169
+ * * are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them
170
+ * * to not be. Doesn't matter what it maps to; use {@link Boolean#TRUE}.
171
+ *
172
+ */
385
173
  ReturnCodabarStartEnd = 8,
386
- /**
387
- *
388
- * * The caller needs to be notified via callback when a possible {@link RXingResultPoint}
389
- * * is found. Maps to a {@link RXingResultPointCallback}.
390
- *
391
- */
174
+ /**
175
+ *
176
+ * * The caller needs to be notified via callback when a possible {@link RXingResultPoint}
177
+ * * is found. Maps to a {@link RXingResultPointCallback}.
178
+ *
179
+ */
392
180
  NeedResultPointCallback = 9,
393
- /**
394
- *
395
- * * Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this.
396
- * * Maps to an {@code int[]} of the allowed extension lengths, for example [2], [5], or [2, 5].
397
- * * If it is optional to have an extension, do not set this hint. If this is set,
398
- * * and a UPC or EAN barcode is found but an extension is not, then no result will be returned
399
- * * at all.
400
- *
401
- */
181
+ /**
182
+ *
183
+ * * Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this.
184
+ * * Maps to an {@code int[]} of the allowed extension lengths, for example [2], [5], or [2, 5].
185
+ * * If it is optional to have an extension, do not set this hint. If this is set,
186
+ * * and a UPC or EAN barcode is found but an extension is not, then no result will be returned
187
+ * * at all.
188
+ *
189
+ */
402
190
  AllowedEanExtensions = 10,
403
- /**
404
- *
405
- * * If true, also tries to decode as inverted image. All configured decoders are simply called a
406
- * * second time with an inverted image. Doesn't matter what it maps to; use {@link Boolean#TRUE}.
407
- *
408
- */
191
+ /**
192
+ *
193
+ * * If true, also tries to decode as inverted image. All configured decoders are simply called a
194
+ * * second time with an inverted image. Doesn't matter what it maps to; use {@link Boolean#TRUE}.
195
+ *
196
+ */
409
197
  AlsoInverted = 11,
410
- /**
411
- *
412
- * * Translate the ASCII values parsed by the Telepen reader into the Telepen Numeric form; use {@link Boolean#TRUE}.
413
- *
414
- */
198
+ /**
199
+ *
200
+ * * Translate the ASCII values parsed by the Telepen reader into the Telepen Numeric form; use {@link Boolean#TRUE}.
201
+ *
202
+ */
415
203
  TelepenAsNumeric = 12,
416
204
  }
417
- /**
418
- */
205
+ export enum EncodeHintTypes {
206
+ /**
207
+ *
208
+ * * Specifies what degree of error correction to use, for example in QR Codes.
209
+ * * Type depends on the encoder. For example for QR codes it's type
210
+ * * {@link com.google.zxing.qrcode.decoder.ErrorCorrectionLevel ErrorCorrectionLevel}.
211
+ * * For Aztec it is of type {@link Integer}, representing the minimal percentage of error correction words.
212
+ * * For PDF417 it is of type {@link Integer}, valid values being 0 to 8.
213
+ * * In all cases, it can also be a {@link String} representation of the desired value as well.
214
+ * * Note: an Aztec symbol should have a minimum of 25% EC words.
215
+ *
216
+ */
217
+ ErrorCorrection = 0,
218
+ /**
219
+ *
220
+ * * Specifies what character encoding to use where applicable (type {@link String})
221
+ *
222
+ */
223
+ CharacterSet = 1,
224
+ /**
225
+ *
226
+ * * Specifies the matrix shape for Data Matrix (type {@link com.google.zxing.datamatrix.encoder.SymbolShapeHint})
227
+ *
228
+ */
229
+ DataMatrixShape = 2,
230
+ /**
231
+ *
232
+ * * Specifies whether to use compact mode for Data Matrix (type {@link Boolean}, or "true" or "false"
233
+ * * {@link String } value).
234
+ * * The compact encoding mode also supports the encoding of characters that are not in the ISO-8859-1
235
+ * * character set via ECIs.
236
+ * * Please note that in that case, the most compact character encoding is chosen for characters in
237
+ * * the input that are not in the ISO-8859-1 character set. Based on experience, some scanners do not
238
+ * * support encodings like cp-1256 (Arabic). In such cases the encoding can be forced to UTF-8 by
239
+ * * means of the {@link #CHARACTER_SET} encoding hint.
240
+ * * Compact encoding also provides GS1-FNC1 support when {@link #GS1_FORMAT} is selected. In this case
241
+ * * group-separator character (ASCII 29 decimal) can be used to encode the positions of FNC1 codewords
242
+ * * for the purpose of delimiting AIs.
243
+ * * This option and {@link #FORCE_C40} are mutually exclusive.
244
+ *
245
+ */
246
+ DataMatrixCompact = 3,
247
+ /**
248
+ *
249
+ * * Specifies a minimum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.
250
+ * *
251
+ * * @deprecated use width/height params in
252
+ * * {@link com.google.zxing.datamatrix.DataMatrixWriter#encode(String, BarcodeFormat, int, int)}
253
+ *
254
+ */
255
+ MinSize = 4,
256
+ /**
257
+ *
258
+ * * Specifies a maximum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.
259
+ * *
260
+ * * @deprecated without replacement
261
+ *
262
+ */
263
+ MaxSize = 5,
264
+ /**
265
+ *
266
+ * * Specifies margin, in pixels, to use when generating the barcode. The meaning can vary
267
+ * * by format; for example it controls margin before and after the barcode horizontally for
268
+ * * most 1D formats. (Type {@link Integer}, or {@link String} representation of the integer value).
269
+ *
270
+ */
271
+ MARGIN = 6,
272
+ /**
273
+ *
274
+ * * Specifies whether to use compact mode for PDF417 (type {@link Boolean}, or "true" or "false"
275
+ * * {@link String} value).
276
+ *
277
+ */
278
+ Pdf417Compact = 7,
279
+ /**
280
+ *
281
+ * * Specifies what compaction mode to use for PDF417 (type
282
+ * * {@link com.google.zxing.pdf417.encoder.Compaction Compaction} or {@link String} value of one of its
283
+ * * enum values).
284
+ *
285
+ */
286
+ Pdf417Compaction = 8,
287
+ /**
288
+ *
289
+ * * Specifies the minimum and maximum number of rows and columns for PDF417 (type
290
+ * * {@link com.google.zxing.pdf417.encoder.Dimensions Dimensions}).
291
+ *
292
+ */
293
+ Pdf417Dimensions = 9,
294
+ /**
295
+ *
296
+ * * Specifies whether to automatically insert ECIs when encoding PDF417 (type {@link Boolean}, or "true" or "false"
297
+ * * {@link String} value).
298
+ * * Please note that in that case, the most compact character encoding is chosen for characters in
299
+ * * the input that are not in the ISO-8859-1 character set. Based on experience, some scanners do not
300
+ * * support encodings like cp-1256 (Arabic). In such cases the encoding can be forced to UTF-8 by
301
+ * * means of the {@link #CHARACTER_SET} encoding hint.
302
+ *
303
+ */
304
+ Pdf417AutoEci = 10,
305
+ /**
306
+ *
307
+ * * Specifies the required number of layers for an Aztec code.
308
+ * * A negative number (-1, -2, -3, -4) specifies a compact Aztec code.
309
+ * * 0 indicates to use the minimum number of layers (the default).
310
+ * * A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code.
311
+ * * (Type {@link Integer}, or {@link String} representation of the integer value).
312
+ *
313
+ */
314
+ AztecLayers = 11,
315
+ /**
316
+ *
317
+ * * Specifies the exact version of QR code to be encoded.
318
+ * * (Type {@link Integer}, or {@link String} representation of the integer value).
319
+ *
320
+ */
321
+ QrVersion = 12,
322
+ /**
323
+ *
324
+ * * Specifies the QR code mask pattern to be used. Allowed values are
325
+ * * 0..QRCode.NUM_MASK_PATTERNS-1. By default the code will automatically select
326
+ * * the optimal mask pattern.
327
+ * * * (Type {@link Integer}, or {@link String} representation of the integer value).
328
+ *
329
+ */
330
+ QrMaskPattern = 13,
331
+ /**
332
+ *
333
+ * * Specifies whether to use compact mode for QR code (type {@link Boolean}, or "true" or "false"
334
+ * * {@link String } value).
335
+ * * Please note that when compaction is performed, the most compact character encoding is chosen
336
+ * * for characters in the input that are not in the ISO-8859-1 character set. Based on experience,
337
+ * * some scanners do not support encodings like cp-1256 (Arabic). In such cases the encoding can
338
+ * * be forced to UTF-8 by means of the {@link #CHARACTER_SET} encoding hint.
339
+ *
340
+ */
341
+ QrCompact = 14,
342
+ /**
343
+ *
344
+ * * Specifies whether the data should be encoded to the GS1 standard (type {@link Boolean}, or "true" or "false"
345
+ * * {@link String } value).
346
+ *
347
+ */
348
+ Gs1Format = 15,
349
+ /**
350
+ *
351
+ * * Forces which encoding will be used. Currently only used for Code-128 code sets (Type {@link String}).
352
+ * * Valid values are "A", "B", "C".
353
+ * * This option and {@link #CODE128_COMPACT} are mutually exclusive.
354
+ *
355
+ */
356
+ ForceCodeSet = 16,
357
+ /**
358
+ *
359
+ * * Forces C40 encoding for data-matrix (type {@link Boolean}, or "true" or "false") {@link String } value). This
360
+ * * option and {@link #DATA_MATRIX_COMPACT} are mutually exclusive.
361
+ *
362
+ */
363
+ ForceC40 = 17,
364
+ /**
365
+ *
366
+ * * Specifies whether to use compact mode for Code-128 code (type {@link Boolean}, or "true" or "false"
367
+ * * {@link String } value).
368
+ * * This can yield slightly smaller bar codes. This option and {@link #FORCE_CODE_SET} are mutually
369
+ * * exclusive.
370
+ *
371
+ */
372
+ Code128Compact = 18,
373
+ TelepenAsNumeric = 19,
374
+ }
419
375
  export class BarcodeResult {
376
+ private constructor();
420
377
  free(): void;
421
- /**
422
- * @returns {number}
423
- */
424
378
  timestamp(): number;
425
- /**
426
- * @returns {BarcodeFormat}
427
- */
428
379
  format(): BarcodeFormat;
429
- /**
430
- * Each pair of f32 values is an (x,y) point
431
- * @returns {Float32Array}
432
- */
380
+ /**
381
+ * Each pair of f32 values is an (x,y) point
382
+ */
433
383
  result_points(): Float32Array;
434
- /**
435
- * @returns {number}
436
- */
437
384
  num_bits(): number;
438
- /**
439
- * @returns {Uint8Array}
440
- */
441
385
  raw_bytes(): Uint8Array;
442
- /**
443
- * @returns {string}
444
- */
445
386
  text(): string;
446
- /**
447
- * @returns {Map<any, any>}
448
- */
449
387
  get_meta_data(): Map<any, any>;
450
388
  }
451
- /**
452
- */
453
389
  export class DecodeHintDictionary {
454
390
  free(): void;
455
- /**
456
- */
457
391
  constructor();
458
- /**
459
- * @param {DecodeHintTypes} hint
460
- * @returns {string}
461
- */
462
392
  get_hint(hint: DecodeHintTypes): string;
463
- /**
464
- * @param {DecodeHintTypes} hint
465
- * @param {string} value
466
- * @returns {boolean}
467
- */
468
393
  set_hint(hint: DecodeHintTypes, value: string): boolean;
469
- /**
470
- * @param {DecodeHintTypes} hint
471
- * @returns {boolean}
472
- */
473
394
  remove_hint(hint: DecodeHintTypes): boolean;
474
395
  }
475
- /**
476
- */
477
396
  export class EncodeHintDictionary {
478
397
  free(): void;
479
- /**
480
- */
481
398
  constructor();
482
- /**
483
- * @param {EncodeHintTypes} hint
484
- * @returns {string}
485
- */
486
399
  get_hint(hint: EncodeHintTypes): string;
487
- /**
488
- * @param {EncodeHintTypes} hint
489
- * @param {string} value
490
- * @returns {boolean}
491
- */
492
400
  set_hint(hint: EncodeHintTypes, value: string): boolean;
493
- /**
494
- * @param {EncodeHintTypes} hint
495
- * @returns {boolean}
496
- */
497
401
  remove_hint(hint: EncodeHintTypes): boolean;
498
402
  }