Skip to content

Commit 4822267

Browse files
committed
bump version to 0.1.4
1 parent a9e446e commit 4822267

3 files changed

Lines changed: 24 additions & 5 deletions

File tree

README.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88

99
*A fast, pure‑Python Aztec Code reader with auto‑orientation and Reed-Solomon correction.*
1010

11+
-------------
12+
13+
Please note that the library is still under development, and some features are unstable. Typically, some Aztec files can be read incorrectly because the image has been exported incorrectly in matrix.
14+
15+
All contributions are welcome!
16+
1117
-------------
1218
## Table of content
1319
1. [Installation](#installation)
@@ -44,9 +50,9 @@ This library installs the following dependencies:
4450
- [toml](https://pypi.org/project/toml/) for version reading
4551

4652
## Usage
47-
The library allows you to decode Aztec barcodes from images. First, you need to have your Aztec barcode perfectly cropped in an image.
53+
The library allows you to decode Aztec barcodes from images.
4854

49-
The most common way to use the library is to use the `AztecDecoder` class. You can create an instance of the class and call the `decode` method with the path to the image file as an argument:
55+
The most common way to use the library is to use the `AztecDecoder` class. You can create an instance of the class and call the `decode` method with the path to the image file as an argument. With this class, you need to have your Aztec barcode perfectly cropped in an image.
5056

5157
```python
5258
>>> from aztec_tool import decode
@@ -68,7 +74,20 @@ If you need to access more specific data, you can use the `AztecDecoder` class d
6874
'Welcome to Aztec tool lib !'
6975
```
7076

71-
When you're using the `decode` function or the `AztecDecoder` class, you can also pass three optional parameters:
77+
If you don't have the Aztec barcode perfectly cropped in an image, you can use this class to cropper it automatically:
78+
```python
79+
>>> from aztec_tool import MultiAztecDecoder
80+
>>> multi_decoder = MultiAztecDecoder("welcome_lib_non_cropped.jpg")
81+
>>> decoder = multi_decoder.decoders[0]
82+
>>> decoder.aztec_type
83+
<AztecType.COMPACT: 0>
84+
>>> decoder.mode_info
85+
{'layers': 3, 'data_words': 21, 'ecc_bits': [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0]}
86+
>>> decoder.decode()
87+
'Welcome to Aztec tool lib !'
88+
```
89+
90+
When you're using the `decode` function or the `AztecDecoder` (or `MultiAztecDecoder`) class, you can also pass three optional parameters:
7291
- `auto_orient`: Default is `True`. If set to `True`, the image will be automatically rotated to the correct orientation before decoding. This is useful if the barcode is reversed or rotated.
7392
- `auto_correct`: Default is `True`. If set to `True`, the data in the Aztec barcode will be automatically corrected. This is useful if the barcode is damaged or has errors.
7493
- `auto_mode_correct`: Default is `True`. If set to `True`, the mode data in the Aztec barcode will be automatically corrected. This is useful if the barcode is damaged or has errors.

TODO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Aztec tool - TODO
2+
- Correct some bugs in the size detection
23
- Allow to decode Aztec barcodes from other sources than images
3-
- Auto cropping Aztec barcodes from images
44
- Allow to decode Aztec barcodes from PNG "without white" images

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "aztec_tool"
3-
version = "0.1.3"
3+
version = "0.1.4"
44
requires-python = ">=3.9"
55
description = "A fast, pure-Python Aztec Code reader with auto-orientation and Reed-Solomon correction."
66
readme = { file = "README.md", content-type = "text/markdown" }

0 commit comments

Comments
 (0)