Skip to content

Commit d8dd6c2

Browse files
test
1 parent 217b1b6 commit d8dd6c2

File tree

65 files changed

+284
-29
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+284
-29
lines changed

README.rst

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ features of Dynamsoft Barcode Reader, bringing convenience for Python developers
2929

3030
Notice: Package Renamed and Updated
3131
-----------------------------------
32-
`dynamsoft_barcode_reader_bundle` is the successor to the `dbr` package, starting from version 10.
32+
`dynamsoft-barcode-reader-bundle` is the successor to the `dbr` package, starting from version 10.
3333
This new version introduces significant architectural improvements and a redesigned API to integrate with
3434
`DynamsoftCaptureVision (DCV) <https://www.dynamsoft.com/capture-vision/docs/core/introduction/index.html?lang=python>`_ architecture,
3535
which is newly established to aggregate the features of functional products powered by Dynamsoft.
@@ -38,7 +38,7 @@ which is newly established to aggregate the features of functional products powe
3838
Version
3939
-------
4040

41-
- 11.0.3000
41+
- 11.0.4000
4242

4343
Supported Platforms
4444
-------------------
@@ -66,7 +66,7 @@ Supported Python Versions
6666
Installation
6767
------------
6868

69-
pip install dynamsoft_barcode_reader_bundle
69+
pip install dynamsoft-barcode-reader-bundle
7070

7171
Supported Symbologies
7272
---------------------
@@ -85,6 +85,8 @@ Supported Symbologies
8585
- Industrial 2 of 5
8686
- MSI Code
8787
- Code 11
88+
- Code32
89+
- Matrix 2 of 5
8890

8991
- 2D Barcodes :
9092

@@ -99,6 +101,8 @@ Supported Symbologies
99101

100102
- Pharmacode
101103

104+
- Telepen
105+
102106
- GS1 Composite Code
103107

104108
- GS1 DataBar :
@@ -118,14 +122,15 @@ Supported Symbologies
118122
- Planet
119123
- Australian Post
120124
- UK Royal Mail
125+
- KIX
121126

122127
Quick Start
123128
-----------
124129
.. code-block:: python
125130
126131
from dynamsoft_barcode_reader_bundle import *
127132
128-
# Apply for a trial license: https://www.dynamsoft.com/customer/license/trialLicense/?product=dbr&utm_source=pypi
133+
# Apply for a trial license: https://www.dynamsoft.com/customer/license/trialLicense/?product=dbr&package=python&utm_source=pypi
129134
license_key = "Input your own license"
130135
image = r"Please input your own image path"
131136
LicenseManager.init_license(license_key)
@@ -157,7 +162,7 @@ Documentation
157162

158163
- `API <https://www.dynamsoft.com/barcode-reader/docs/server/programming/python/api-reference/?utm_source=pypi>`_
159164
- `User Guide <https://www.dynamsoft.com/barcode-reader/docs/server/programming/python/user-guide.html?utm_source=pypi>`_
160-
- `Release Notes <https://www.dynamsoft.com/barcode-reader/docs/server/programming/python/release-notes/python-10.html?utm_source=pypi>`_
165+
- `Release Notes <https://www.dynamsoft.com/barcode-reader/docs/server/programming/python/release-notes/python-11.html?utm_source=pypi>`_
161166

162167

163168
Contact Us

dynamsoft_barcode_reader_bundle/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
from .license import *
66
from .utility import *
77

8-
__version__ = "11.0.3000"
8+
__version__ = "11.0.4000"

dynamsoft_barcode_reader_bundle/core.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "4.0.30.0559"
1+
__version__ = "4.0.30.1979"
22

33
import sys
44

@@ -81,6 +81,7 @@ class EnumErrorCode(IntEnum):
8181
EC_MODEL_FILE_NOT_FOUND = _DynamsoftCore.EC_MODEL_FILE_NOT_FOUND
8282
EC_PDF_LICENSE_NOT_FOUND = _DynamsoftCore.EC_PDF_LICENSE_NOT_FOUND
8383
EC_RECT_INVALID = _DynamsoftCore.EC_RECT_INVALID
84+
EC_TEMPLATE_VERSION_INCOMPATIBLE = _DynamsoftCore.EC_TEMPLATE_VERSION_INCOMPATIBLE
8485
EC_NO_LICENSE = _DynamsoftCore.EC_NO_LICENSE
8586
EC_HANDSHAKE_CODE_INVALID = _DynamsoftCore.EC_HANDSHAKE_CODE_INVALID
8687
EC_LICENSE_BUFFER_FAILED = _DynamsoftCore.EC_LICENSE_BUFFER_FAILED
@@ -93,6 +94,8 @@ class EnumErrorCode(IntEnum):
9394
EC_TRIAL_LICENSE = _DynamsoftCore.EC_TRIAL_LICENSE
9495
EC_LICENSE_VERSION_NOT_MATCH = _DynamsoftCore.EC_LICENSE_VERSION_NOT_MATCH
9596
EC_LICENSE_CACHE_USED = _DynamsoftCore.EC_LICENSE_CACHE_USED
97+
EC_LICENSE_AUTH_QUOTA_EXCEEDED = _DynamsoftCore.EC_LICENSE_AUTH_QUOTA_EXCEEDED
98+
EC_LICENSE_RESULTS_LIMIT_EXCEEDED = _DynamsoftCore.EC_LICENSE_RESULTS_LIMIT_EXCEEDED
9699
EC_FAILED_TO_REACH_DLS = _DynamsoftCore.EC_FAILED_TO_REACH_DLS
97100
EC_BARCODE_FORMAT_INVALID = _DynamsoftCore.EC_BARCODE_FORMAT_INVALID
98101
EC_QR_LICENSE_INVALID = _DynamsoftCore.EC_QR_LICENSE_INVALID

dynamsoft_barcode_reader_bundle/cvr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "3.0.30.0559"
1+
__version__ = "3.0.30.1979"
22

33
if __package__ or "." in __name__:
44
from .core import *

dynamsoft_barcode_reader_bundle/dbr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "11.0.30.0559"
1+
__version__ = "11.0.30.1979"
22

33
if __package__ or "." in __name__:
44
from .core import *

dynamsoft_barcode_reader_bundle/dip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "3.0.30.0559"
1+
__version__ = "3.0.30.1979"
22

33
if __package__ or "." in __name__:
44
from . import _DynamsoftImageProcessing

dynamsoft_barcode_reader_bundle/dnn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "2.0.30.0559"
1+
__version__ = "2.0.30.1979"
22

33
if __package__ or "." in __name__:
44
from . import _DynamsoftNeuralNetwork

dynamsoft_barcode_reader_bundle/license.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "4.0.30.0559"
1+
__version__ = "4.0.30.1979"
22

33
if __package__ or "." in __name__:
44
from . import _DynamsoftLicense

dynamsoft_barcode_reader_bundle/utility.py

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "2.0.30.0559"
1+
__version__ = "2.0.30.1979"
22

33
if __package__ or "." in __name__:
44
from .cvr import *
@@ -685,9 +685,38 @@ def crop_image(self, image_data:ImageData, crop_form: Union[Rect,Quadrilateral])
685685
if isinstance(crop_form, Rect):
686686
return _DynamsoftUtility.CImageProcessor_CropImageWithRect(self, image_data, crop_form)
687687
elif isinstance(crop_form, Quadrilateral):
688+
import warnings
689+
warnings.warn(
690+
"Function 'crop_image' with parameter type `Quadrilateral` is deprecated and will be removed in future versions. Please use `crop_and_deskew_image` function instead.",
691+
DeprecationWarning,
692+
stacklevel=2
693+
)
688694
return _DynamsoftUtility.CImageProcessor_CropImageWithQuadrilateral(self, image_data, crop_form)
689695
else:
690696
raise TypeError("Unsupported crop form type")
697+
698+
def crop_and_deskew_image(self, image_data: ImageData, crop_form: Quadrilateral, destination_width: int = 0, destination_height: int = 0, padding: int = 0) -> Tuple[int, ImageData]:
699+
"""
700+
Crops and deskews a region from the input image based on the specified quadrilateral.
701+
702+
Args:
703+
image_data (ImageData): The image data to be cropped and deskewed.
704+
crop_form (Quadrilateral): Quad A quadrilateral defining the region of interest to extract.
705+
destination_width (int, optional): The width of the output image. If set to 0, the width and height will be automatically calculated.
706+
destination_height (int, optional): The height of the output image. If set to 0, the width and height will be automatically calculated.
707+
padding (int, optional): Extra padding (in pixels) applied to expand the boundaries of the extracted region. Default is 0.
708+
709+
Returns:
710+
A tuple containing following elements:
711+
- error_code (int): The error code indicating the status of the operation.
712+
- cropped_image_data (ImageData): An ImageData object representing the cropped and deskewed image if succeeds, None otherwise.
713+
714+
Notes:
715+
The caller is responsible for freeing the memory allocated for the cropped image.
716+
The function will automatically calculate the perspective transform matrix and use it to crop the image.
717+
If the specified quadrilateral exceeds the image boundaries, white will be used to fill the exceeding area.
718+
"""
719+
return _DynamsoftUtility.CImageProcessor_CropAndDeskewImage(self, image_data, crop_form, destination_width, destination_height, padding)
691720
def adjust_brightness(self, image_data: ImageData, brightness: int) -> ImageData:
692721
"""
693722
Adjusts the brightness of the image.

include/DynamsoftBarcodeReader.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ typedef void* HANDLE;
1818

1919
#include "DynamsoftCore.h"
2020

21-
#define DBR_VERSION "11.0.30.4532"
21+
#define DBR_VERSION "11.0.40.5013"
2222

2323
/**Enumeration section*/
2424

@@ -38,7 +38,7 @@ enum BarcodeFormat : unsigned long long
3838
/**Use the default barcode format settings*/
3939
BF_DEFAULT = 0xFE3BFFFF,
4040

41-
/**Combined value of BF_CODABAR, BF_CODE_128, BF_CODE_39, BF_CODE_39_Extended, BF_CODE_93, BF_EAN_13, BF_EAN_8, INDUSTRIAL_25, BF_ITF, BF_UPC_A, BF_UPC_E, BF_MSI_CODE; */
41+
/**Combined value of BF_CODABAR, BF_CODE_128, BF_CODE_39, BF_CODE_39_Extended, BF_CODE_93, BF_EAN_13, BF_EAN_8, INDUSTRIAL_25, BF_ITF, BF_UPC_A, BF_UPC_E, BF_MSI_CODE, BF_CODE_11; */
4242
BF_ONED = 0x003007FF,
4343

4444
/**Combined value of BF_GS1_DATABAR_OMNIDIRECTIONAL, BF_GS1_DATABAR_TRUNCATED, BF_GS1_DATABAR_STACKED, BF_GS1_DATABAR_STACKED_OMNIDIRECTIONAL, BF_GS1_DATABAR_EXPANDED, BF_GS1_DATABAR_EXPANDED_STACKED, BF_GS1_DATABAR_LIMITED*/
@@ -156,7 +156,7 @@ enum BarcodeFormat : unsigned long long
156156
*/
157157
BF_TELEPEN_NUMERIC = 0x4000000000,
158158

159-
/**Combined value of BF2_USPSINTELLIGENTMAIL, BF2_POSTNET, BF2_PLANET, BF2_AUSTRALIANPOST, BF2_RM4SCC.*/
159+
/**Combined value of BF_USPSINTELLIGENTMAIL, BF_POSTNET, BF_PLANET, BF_AUSTRALIANPOST, BF_RM4SCC, BF_KIX.*/
160160
BF_POSTALCODE = 0x3F0000000000000,
161161

162162
/**Nonstandard barcode */
@@ -1345,6 +1345,9 @@ namespace dynamsoft
13451345
* @return Returns 0 if successful, otherwise returns a negative value.
13461346
*/
13471347
virtual int SetDecodedBarcode(const CDecodedBarcodeElement* element, const double matrixToOriginalImage[9] = IDENTITY_MATRIX) = 0;
1348+
1349+
1350+
virtual int RemoveDecodedBarcode(int index) = 0;
13481351
};
13491352
}
13501353

@@ -1465,7 +1468,6 @@ namespace dynamsoft
14651468
*
14661469
*/
14671470
virtual int SetLocation(const CQuadrilateral& location) = 0;
1468-
14691471
};
14701472

14711473
/**

0 commit comments

Comments
 (0)