Skip to content

Commit

Permalink
Release 23.8 (#64)
Browse files Browse the repository at this point in the history
* Added AllowAdditionalRestorations flag to reader params

Added  DataMatrixVersion enum and  DataMatrixVersion param into DataMatrixParams

* Improved Docs

---------
Co-authored-by: Denis Averin <denis.averin@aspose.com>
  • Loading branch information
ivankamkin authored Aug 30, 2023
1 parent e183e2b commit 6a72adc
Show file tree
Hide file tree
Showing 90 changed files with 1,027 additions and 284 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![PyPI](https://img.shields.io/pypi/v/aspose-barcode-cloud)](https://pypi.org/project/aspose-barcode-cloud/)

- API version: 3.0
- Package version: 23.7.0
- Package version: 23.8.0

## Demo applications

Expand Down Expand Up @@ -163,6 +163,7 @@ Class | Method | HTTP request | Description
- [DataMatrixEccType](docs/DataMatrixEccType.md)
- [DataMatrixEncodeMode](docs/DataMatrixEncodeMode.md)
- [DataMatrixParams](docs/DataMatrixParams.md)
- [DataMatrixVersion](docs/DataMatrixVersion.md)
- [DecodeBarcodeType](docs/DecodeBarcodeType.md)
- [DiscUsage](docs/DiscUsage.md)
- [DotCodeEncodeMode](docs/DotCodeEncodeMode.md)
Expand Down
1 change: 1 addition & 0 deletions aspose_barcode_cloud/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
from aspose_barcode_cloud.models.data_matrix_ecc_type import DataMatrixEccType
from aspose_barcode_cloud.models.data_matrix_encode_mode import DataMatrixEncodeMode
from aspose_barcode_cloud.models.data_matrix_params import DataMatrixParams
from aspose_barcode_cloud.models.data_matrix_version import DataMatrixVersion
from aspose_barcode_cloud.models.decode_barcode_type import DecodeBarcodeType
from aspose_barcode_cloud.models.disc_usage import DiscUsage
from aspose_barcode_cloud.models.dot_code_encode_mode import DotCodeEncodeMode
Expand Down
14 changes: 14 additions & 0 deletions aspose_barcode_cloud/api/barcode_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@ def get_barcode_recognize(
allow_white_spots_removing=None,
check_more1_d_variants=None,
fast_scan_only=None,
allow_additional_restorations=None,
region_likelihood_threshold_percent=None,
scan_window_sizes=None,
similarity=None,
Expand Down Expand Up @@ -483,6 +484,7 @@ def get_barcode_recognize(
:param bool allow_white_spots_removing: Allows engine to recognize image without small white spots as additional scan. Mode helps to recognize noised image as well as median smoothing filtering. # noqa: E501
:param bool check_more1_d_variants: Allows engine to recognize 1D barcodes with checksum by checking more recognition variants. Default value: False. # noqa: E501
:param bool fast_scan_only: Allows engine for 1D barcodes to quickly recognize middle slice of an image and return result without using any time-consuming algorithms. Default value: False. # noqa: E501
:param bool allow_additional_restorations: Allows engine using additional image restorations to recognize corrupted barcodes. At this time, it is used only in MicroPdf417 barcode type. Default value: False. # noqa: E501
:param float region_likelihood_threshold_percent: Sets threshold for detected regions that may contain barcodes. Value 0.7 means that bottom 70% of possible regions are filtered out and not processed further. Region likelihood threshold must be between [0.05, 0.9] Use high values for clear images with few barcodes. Use low values for images with many barcodes or for noisy images. Low value may lead to a bigger recognition time. # noqa: E501
:param list[int] scan_window_sizes: Scan window sizes in pixels. Allowed sizes are 10, 15, 20, 25, 30. Scanning with small window size takes more time and provides more accuracy but may fail in detecting very big barcodes. Combining of several window sizes can improve detection quality. # noqa: E501
:param float similarity: Similarity coefficient depends on how homogeneous barcodes are. Use high value for for clear barcodes. Use low values to detect barcodes that ara partly damaged or not lighten evenly. Similarity coefficient must be between [0.5, 0.9] # noqa: E501
Expand Down Expand Up @@ -528,6 +530,7 @@ def get_barcode_recognize(
allow_white_spots_removing=allow_white_spots_removing,
check_more1_d_variants=check_more1_d_variants,
fast_scan_only=fast_scan_only,
allow_additional_restorations=allow_additional_restorations,
region_likelihood_threshold_percent=region_likelihood_threshold_percent,
scan_window_sizes=scan_window_sizes,
similarity=similarity,
Expand Down Expand Up @@ -569,6 +572,7 @@ def get_barcode_recognize(
allow_white_spots_removing=allow_white_spots_removing,
check_more1_d_variants=check_more1_d_variants,
fast_scan_only=fast_scan_only,
allow_additional_restorations=allow_additional_restorations,
region_likelihood_threshold_percent=region_likelihood_threshold_percent,
scan_window_sizes=scan_window_sizes,
similarity=similarity,
Expand Down Expand Up @@ -625,6 +629,7 @@ def get_barcode_recognize_with_http_info(self, name, **kwargs):
"allow_white_spots_removing",
"check_more1_d_variants",
"fast_scan_only",
"allow_additional_restorations",
"region_likelihood_threshold_percent",
"scan_window_sizes",
"similarity",
Expand Down Expand Up @@ -714,6 +719,8 @@ def get_barcode_recognize_with_http_info(self, name, **kwargs):
query_params.append(("CheckMore1DVariants", params["check_more1_d_variants"]))
if "fast_scan_only" in params:
query_params.append(("FastScanOnly", params["fast_scan_only"]))
if "allow_additional_restorations" in params:
query_params.append(("AllowAdditionalRestorations", params["allow_additional_restorations"]))
if "region_likelihood_threshold_percent" in params:
query_params.append(("RegionLikelihoodThresholdPercent", params["region_likelihood_threshold_percent"]))
if "scan_window_sizes" in params:
Expand Down Expand Up @@ -798,6 +805,7 @@ def post_barcode_recognize_from_url_or_content(
allow_white_spots_removing=None,
check_more1_d_variants=None,
fast_scan_only=None,
allow_additional_restorations=None,
region_likelihood_threshold_percent=None,
scan_window_sizes=None,
similarity=None,
Expand Down Expand Up @@ -844,6 +852,7 @@ def post_barcode_recognize_from_url_or_content(
:param bool allow_white_spots_removing: Allows engine to recognize image without small white spots as additional scan. Mode helps to recognize noised image as well as median smoothing filtering. # noqa: E501
:param bool check_more1_d_variants: Allows engine to recognize 1D barcodes with checksum by checking more recognition variants. Default value: False. # noqa: E501
:param bool fast_scan_only: Allows engine for 1D barcodes to quickly recognize middle slice of an image and return result without using any time-consuming algorithms. Default value: False. # noqa: E501
:param bool allow_additional_restorations: Allows engine using additional image restorations to recognize corrupted barcodes. At this time, it is used only in MicroPdf417 barcode type. Default value: False. # noqa: E501
:param float region_likelihood_threshold_percent: Sets threshold for detected regions that may contain barcodes. Value 0.7 means that bottom 70% of possible regions are filtered out and not processed further. Region likelihood threshold must be between [0.05, 0.9] Use high values for clear images with few barcodes. Use low values for images with many barcodes or for noisy images. Low value may lead to a bigger recognition time. # noqa: E501
:param list[int] scan_window_sizes: Scan window sizes in pixels. Allowed sizes are 10, 15, 20, 25, 30. Scanning with small window size takes more time and provides more accuracy but may fail in detecting very big barcodes. Combining of several window sizes can improve detection quality. # noqa: E501
:param float similarity: Similarity coefficient depends on how homogeneous barcodes are. Use high value for for clear barcodes. Use low values to detect barcodes that ara partly damaged or not lighten evenly. Similarity coefficient must be between [0.5, 0.9] # noqa: E501
Expand Down Expand Up @@ -888,6 +897,7 @@ def post_barcode_recognize_from_url_or_content(
allow_white_spots_removing=allow_white_spots_removing,
check_more1_d_variants=check_more1_d_variants,
fast_scan_only=fast_scan_only,
allow_additional_restorations=allow_additional_restorations,
region_likelihood_threshold_percent=region_likelihood_threshold_percent,
scan_window_sizes=scan_window_sizes,
similarity=similarity,
Expand Down Expand Up @@ -928,6 +938,7 @@ def post_barcode_recognize_from_url_or_content(
allow_white_spots_removing=allow_white_spots_removing,
check_more1_d_variants=check_more1_d_variants,
fast_scan_only=fast_scan_only,
allow_additional_restorations=allow_additional_restorations,
region_likelihood_threshold_percent=region_likelihood_threshold_percent,
scan_window_sizes=scan_window_sizes,
similarity=similarity,
Expand Down Expand Up @@ -982,6 +993,7 @@ def post_barcode_recognize_from_url_or_content_with_http_info(self, **kwargs):
"allow_white_spots_removing",
"check_more1_d_variants",
"fast_scan_only",
"allow_additional_restorations",
"region_likelihood_threshold_percent",
"scan_window_sizes",
"similarity",
Expand Down Expand Up @@ -1069,6 +1081,8 @@ def post_barcode_recognize_from_url_or_content_with_http_info(self, **kwargs):
query_params.append(("CheckMore1DVariants", params["check_more1_d_variants"]))
if "fast_scan_only" in params:
query_params.append(("FastScanOnly", params["fast_scan_only"]))
if "allow_additional_restorations" in params:
query_params.append(("AllowAdditionalRestorations", params["allow_additional_restorations"]))
if "region_likelihood_threshold_percent" in params:
query_params.append(("RegionLikelihoodThresholdPercent", params["region_likelihood_threshold_percent"]))
if "scan_window_sizes" in params:
Expand Down
4 changes: 2 additions & 2 deletions aspose_barcode_cloud/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ def __init__(self, configuration=None, header_name=None, header_value=None, cook
self.rest_client = RESTClientObject(configuration)
self.default_headers = {
"x-aspose-client": "python sdk",
"x-aspose-client-version": "23.7.0",
"x-aspose-client-version": "23.8.0",
}
if header_name is not None:
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = "Aspose-Barcode-SDK/23.7.0/python"
self.user_agent = "Aspose-Barcode-SDK/23.8.0/python"

def __del__(self):
self.rest_client.close()
Expand Down
2 changes: 1 addition & 1 deletion aspose_barcode_cloud/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def to_debug_report(self):
"OS: {env}\n"
"Python Version: {pyversion}\n"
"Version of the API: 3.0\n"
"SDK Package Version: 23.7.0".format(env=sys.platform, pyversion=sys.version)
"SDK Package Version: 23.8.0".format(env=sys.platform, pyversion=sys.version)
)

@staticmethod
Expand Down
1 change: 1 addition & 0 deletions aspose_barcode_cloud/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
from aspose_barcode_cloud.models.data_matrix_ecc_type import DataMatrixEccType
from aspose_barcode_cloud.models.data_matrix_encode_mode import DataMatrixEncodeMode
from aspose_barcode_cloud.models.data_matrix_params import DataMatrixParams
from aspose_barcode_cloud.models.data_matrix_version import DataMatrixVersion
from aspose_barcode_cloud.models.decode_barcode_type import DecodeBarcodeType
from aspose_barcode_cloud.models.disc_usage import DiscUsage
from aspose_barcode_cloud.models.dot_code_encode_mode import DotCodeEncodeMode
Expand Down
29 changes: 29 additions & 0 deletions aspose_barcode_cloud/models/data_matrix_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class DataMatrixParams(object):
"data_matrix_encode_mode": "DataMatrixEncodeMode",
"rows": "int",
"macro_characters": "MacroCharacter",
"version": "DataMatrixVersion",
}

attribute_map = {
Expand All @@ -63,6 +64,7 @@ class DataMatrixParams(object):
"data_matrix_encode_mode": "DataMatrixEncodeMode",
"rows": "Rows",
"macro_characters": "MacroCharacters",
"version": "Version",
}

def __init__(
Expand All @@ -74,6 +76,7 @@ def __init__(
data_matrix_encode_mode=None,
rows=None,
macro_characters=None,
version=None,
): # noqa: E501
"""DataMatrixParams - a model defined in Swagger""" # noqa: E501

Expand All @@ -84,6 +87,7 @@ def __init__(
self._data_matrix_encode_mode = None
self._rows = None
self._macro_characters = None
self._version = None
self.discriminator = None

if aspect_ratio is not None:
Expand All @@ -100,6 +104,8 @@ def __init__(
self.rows = rows
if macro_characters is not None:
self.macro_characters = macro_characters
if version is not None:
self.version = version

@property
def aspect_ratio(self):
Expand Down Expand Up @@ -270,6 +276,29 @@ def macro_characters(self, macro_characters):

self._macro_characters = macro_characters

@property
def version(self):
"""Gets the version of this DataMatrixParams. # noqa: E501
Sets a Datamatrix symbol size. Default value: DataMatrixVersion.Auto. # noqa: E501
:return: The version of this DataMatrixParams. # noqa: E501
:rtype: DataMatrixVersion
"""
return self._version

@version.setter
def version(self, version):
"""Sets the version of this DataMatrixParams.
Sets a Datamatrix symbol size. Default value: DataMatrixVersion.Auto. # noqa: E501
:param version: The version of this DataMatrixParams. # noqa: E501
:type: DataMatrixVersion
"""

self._version = version

def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
Expand Down
Loading

0 comments on commit 6a72adc

Please sign in to comment.