Skip to content

Commit f57e27b

Browse files
authored
Release 21.10 (#28)
1 parent bc96804 commit f57e27b

9 files changed

Lines changed: 118 additions & 15 deletions

File tree

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
# Aspose.BarCode Cloud SDK for Python
22

3+
| WARNING: **Update SDK to version >= 21.9.0**: All SDK version < 21.9.0 will stop working soon! |
4+
| ---------------------------------------------------------------------------------------------- |
5+
36
[![License](https://img.shields.io/github/license/aspose-barcode-cloud/aspose-barcode-cloud-python)](LICENSE)
47
[![Python package](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-python/actions/workflows/python-package.yml/badge.svg)](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-python/actions/workflows/python-package.yml)
58
[![PyPI](https://img.shields.io/pypi/v/aspose-barcode-cloud)](https://pypi.org/project/aspose-barcode-cloud/)
69

710
- API version: 3.0
8-
- Package version: 21.9.0
11+
- Package version: 21.10.0
912

1013
## Demo applications
1114

aspose_barcode_cloud/api/barcode_api.py

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,12 +427,14 @@ def get_barcode_recognize(
427427
allow_salt_and_pepper_filtering=None,
428428
allow_white_spots_removing=None,
429429
check_more1_d_variants=None,
430+
fast_scan_only=None,
430431
region_likelihood_threshold_percent=None,
431432
scan_window_sizes=None,
432433
similarity=None,
433434
skip_diagonal_search=None,
434435
read_tiny_barcodes=None,
435436
australian_post_encoding_table=None,
437+
ignore_ending_filling_patterns_for_c_table=None,
436438
rectangle_region=None,
437439
storage=None,
438440
folder=None,
@@ -473,12 +475,14 @@ def get_barcode_recognize(
473475
:param bool allow_salt_and_pepper_filtering: Allows engine to recognize barcodes with salt and pepper noise type. Mode can remove small noise with white and black dots. # noqa: E501
474476
: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
475477
:param bool check_more1_d_variants: Allows engine to recognize 1D barcodes with checksum by checking more recognition variants. Default value: False. # noqa: E501
478+
: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
476479
: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
477480
: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
478481
: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
479482
:param bool skip_diagonal_search: Allows detector to skip search for diagonal barcodes. Setting it to false will increase detection time but allow to find diagonal barcodes that can be missed otherwise. Enabling of diagonal search leads to a bigger detection time. # noqa: E501
480483
:param bool read_tiny_barcodes: Allows engine to recognize tiny barcodes on large images. Ignored if AllowIncorrectBarcodes is set to True. Default value: False. # noqa: E501
481484
:param str australian_post_encoding_table: Interpreting Type for the Customer Information of AustralianPost BarCode.Default is CustomerInformationInterpretingType.Other. # noqa: E501
485+
:param bool ignore_ending_filling_patterns_for_c_table: The flag which force AustraliaPost decoder to ignore last filling patterns in Customer Information Field during decoding as CTable method. CTable encoding method does not have any gaps in encoding table and sequnce \"333\" of filling paterns is decoded as letter \"z\". # noqa: E501
482486
:param str rectangle_region: # noqa: E501
483487
:param str storage: The image storage. # noqa: E501
484488
:param str folder: The image folder. # noqa: E501
@@ -517,12 +521,14 @@ def get_barcode_recognize(
517521
allow_salt_and_pepper_filtering=allow_salt_and_pepper_filtering,
518522
allow_white_spots_removing=allow_white_spots_removing,
519523
check_more1_d_variants=check_more1_d_variants,
524+
fast_scan_only=fast_scan_only,
520525
region_likelihood_threshold_percent=region_likelihood_threshold_percent,
521526
scan_window_sizes=scan_window_sizes,
522527
similarity=similarity,
523528
skip_diagonal_search=skip_diagonal_search,
524529
read_tiny_barcodes=read_tiny_barcodes,
525530
australian_post_encoding_table=australian_post_encoding_table,
531+
ignore_ending_filling_patterns_for_c_table=ignore_ending_filling_patterns_for_c_table,
526532
rectangle_region=rectangle_region,
527533
storage=storage,
528534
folder=folder,
@@ -557,12 +563,14 @@ def get_barcode_recognize(
557563
allow_salt_and_pepper_filtering=allow_salt_and_pepper_filtering,
558564
allow_white_spots_removing=allow_white_spots_removing,
559565
check_more1_d_variants=check_more1_d_variants,
566+
fast_scan_only=fast_scan_only,
560567
region_likelihood_threshold_percent=region_likelihood_threshold_percent,
561568
scan_window_sizes=scan_window_sizes,
562569
similarity=similarity,
563570
skip_diagonal_search=skip_diagonal_search,
564571
read_tiny_barcodes=read_tiny_barcodes,
565572
australian_post_encoding_table=australian_post_encoding_table,
573+
ignore_ending_filling_patterns_for_c_table=ignore_ending_filling_patterns_for_c_table,
566574
rectangle_region=rectangle_region,
567575
storage=storage,
568576
folder=folder,
@@ -612,12 +620,14 @@ def get_barcode_recognize_with_http_info(self, name, **kwargs):
612620
"allow_salt_and_pepper_filtering",
613621
"allow_white_spots_removing",
614622
"check_more1_d_variants",
623+
"fast_scan_only",
615624
"region_likelihood_threshold_percent",
616625
"scan_window_sizes",
617626
"similarity",
618627
"skip_diagonal_search",
619628
"read_tiny_barcodes",
620629
"australian_post_encoding_table",
630+
"ignore_ending_filling_patterns_for_c_table",
621631
"rectangle_region",
622632
"storage",
623633
"folder",
@@ -699,6 +709,8 @@ def get_barcode_recognize_with_http_info(self, name, **kwargs):
699709
query_params.append(("AllowWhiteSpotsRemoving", params["allow_white_spots_removing"]))
700710
if "check_more1_d_variants" in params:
701711
query_params.append(("CheckMore1DVariants", params["check_more1_d_variants"]))
712+
if "fast_scan_only" in params:
713+
query_params.append(("FastScanOnly", params["fast_scan_only"]))
702714
if "region_likelihood_threshold_percent" in params:
703715
query_params.append(("RegionLikelihoodThresholdPercent", params["region_likelihood_threshold_percent"]))
704716
if "scan_window_sizes" in params:
@@ -712,6 +724,10 @@ def get_barcode_recognize_with_http_info(self, name, **kwargs):
712724
query_params.append(("ReadTinyBarcodes", params["read_tiny_barcodes"]))
713725
if "australian_post_encoding_table" in params:
714726
query_params.append(("AustralianPostEncodingTable", params["australian_post_encoding_table"]))
727+
if "ignore_ending_filling_patterns_for_c_table" in params:
728+
query_params.append(
729+
("IgnoreEndingFillingPatternsForCTable", params["ignore_ending_filling_patterns_for_c_table"])
730+
)
715731
if "rectangle_region" in params:
716732
query_params.append(("RectangleRegion", params["rectangle_region"]))
717733
if "storage" in params:
@@ -780,12 +796,14 @@ def post_barcode_recognize_from_url_or_content(
780796
allow_salt_and_pepper_filtering=None,
781797
allow_white_spots_removing=None,
782798
check_more1_d_variants=None,
799+
fast_scan_only=None,
783800
region_likelihood_threshold_percent=None,
784801
scan_window_sizes=None,
785802
similarity=None,
786803
skip_diagonal_search=None,
787804
read_tiny_barcodes=None,
788805
australian_post_encoding_table=None,
806+
ignore_ending_filling_patterns_for_c_table=None,
789807
rectangle_region=None,
790808
url=None,
791809
image=None,
@@ -825,12 +843,14 @@ def post_barcode_recognize_from_url_or_content(
825843
:param bool allow_salt_and_pepper_filtering: Allows engine to recognize barcodes with salt and pepper noise type. Mode can remove small noise with white and black dots. # noqa: E501
826844
: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
827845
:param bool check_more1_d_variants: Allows engine to recognize 1D barcodes with checksum by checking more recognition variants. Default value: False. # noqa: E501
846+
: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
828847
: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
829848
: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
830849
: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
831850
:param bool skip_diagonal_search: Allows detector to skip search for diagonal barcodes. Setting it to false will increase detection time but allow to find diagonal barcodes that can be missed otherwise. Enabling of diagonal search leads to a bigger detection time. # noqa: E501
832851
:param bool read_tiny_barcodes: Allows engine to recognize tiny barcodes on large images. Ignored if AllowIncorrectBarcodes is set to True. Default value: False. # noqa: E501
833852
:param str australian_post_encoding_table: Interpreting Type for the Customer Information of AustralianPost BarCode.Default is CustomerInformationInterpretingType.Other. # noqa: E501
853+
:param bool ignore_ending_filling_patterns_for_c_table: The flag which force AustraliaPost decoder to ignore last filling patterns in Customer Information Field during decoding as CTable method. CTable encoding method does not have any gaps in encoding table and sequnce \"333\" of filling paterns is decoded as letter \"z\". # noqa: E501
834854
:param str rectangle_region: # noqa: E501
835855
:param str url: The image file url. # noqa: E501
836856
:param file image: Image data # noqa: E501
@@ -868,12 +888,14 @@ def post_barcode_recognize_from_url_or_content(
868888
allow_salt_and_pepper_filtering=allow_salt_and_pepper_filtering,
869889
allow_white_spots_removing=allow_white_spots_removing,
870890
check_more1_d_variants=check_more1_d_variants,
891+
fast_scan_only=fast_scan_only,
871892
region_likelihood_threshold_percent=region_likelihood_threshold_percent,
872893
scan_window_sizes=scan_window_sizes,
873894
similarity=similarity,
874895
skip_diagonal_search=skip_diagonal_search,
875896
read_tiny_barcodes=read_tiny_barcodes,
876897
australian_post_encoding_table=australian_post_encoding_table,
898+
ignore_ending_filling_patterns_for_c_table=ignore_ending_filling_patterns_for_c_table,
877899
rectangle_region=rectangle_region,
878900
url=url,
879901
image=image,
@@ -907,12 +929,14 @@ def post_barcode_recognize_from_url_or_content(
907929
allow_salt_and_pepper_filtering=allow_salt_and_pepper_filtering,
908930
allow_white_spots_removing=allow_white_spots_removing,
909931
check_more1_d_variants=check_more1_d_variants,
932+
fast_scan_only=fast_scan_only,
910933
region_likelihood_threshold_percent=region_likelihood_threshold_percent,
911934
scan_window_sizes=scan_window_sizes,
912935
similarity=similarity,
913936
skip_diagonal_search=skip_diagonal_search,
914937
read_tiny_barcodes=read_tiny_barcodes,
915938
australian_post_encoding_table=australian_post_encoding_table,
939+
ignore_ending_filling_patterns_for_c_table=ignore_ending_filling_patterns_for_c_table,
916940
rectangle_region=rectangle_region,
917941
url=url,
918942
image=image,
@@ -960,12 +984,14 @@ def post_barcode_recognize_from_url_or_content_with_http_info(self, **kwargs):
960984
"allow_salt_and_pepper_filtering",
961985
"allow_white_spots_removing",
962986
"check_more1_d_variants",
987+
"fast_scan_only",
963988
"region_likelihood_threshold_percent",
964989
"scan_window_sizes",
965990
"similarity",
966991
"skip_diagonal_search",
967992
"read_tiny_barcodes",
968993
"australian_post_encoding_table",
994+
"ignore_ending_filling_patterns_for_c_table",
969995
"rectangle_region",
970996
"url",
971997
"image",
@@ -1045,6 +1071,8 @@ def post_barcode_recognize_from_url_or_content_with_http_info(self, **kwargs):
10451071
query_params.append(("AllowWhiteSpotsRemoving", params["allow_white_spots_removing"]))
10461072
if "check_more1_d_variants" in params:
10471073
query_params.append(("CheckMore1DVariants", params["check_more1_d_variants"]))
1074+
if "fast_scan_only" in params:
1075+
query_params.append(("FastScanOnly", params["fast_scan_only"]))
10481076
if "region_likelihood_threshold_percent" in params:
10491077
query_params.append(("RegionLikelihoodThresholdPercent", params["region_likelihood_threshold_percent"]))
10501078
if "scan_window_sizes" in params:
@@ -1058,6 +1086,10 @@ def post_barcode_recognize_from_url_or_content_with_http_info(self, **kwargs):
10581086
query_params.append(("ReadTinyBarcodes", params["read_tiny_barcodes"]))
10591087
if "australian_post_encoding_table" in params:
10601088
query_params.append(("AustralianPostEncodingTable", params["australian_post_encoding_table"]))
1089+
if "ignore_ending_filling_patterns_for_c_table" in params:
1090+
query_params.append(
1091+
("IgnoreEndingFillingPatternsForCTable", params["ignore_ending_filling_patterns_for_c_table"])
1092+
)
10611093
if "rectangle_region" in params:
10621094
query_params.append(("RectangleRegion", params["rectangle_region"]))
10631095
if "url" in params:
@@ -1076,7 +1108,7 @@ def post_barcode_recognize_from_url_or_content_with_http_info(self, **kwargs):
10761108

10771109
# HTTP header "Content-Type"
10781110
header_params["Content-Type"] = self.api_client.select_header_content_type(
1079-
["multipart/form-data", "application/x-www-form-urlencoded", "application/octet-stream"]
1111+
["multipart/form-data", "application/octet-stream"]
10801112
)
10811113

10821114
# Authentication setting
@@ -1557,7 +1589,7 @@ def put_barcode_generate_file_with_http_info(self, name, type, text, **kwargs):
15571589

15581590
# HTTP header "Content-Type"
15591591
header_params["Content-Type"] = self.api_client.select_header_content_type(
1560-
["multipart/form-data", "application/x-www-form-urlencoded", "application/json", "application/xml"]
1592+
["application/json", "application/xml", "multipart/form-data"]
15611593
)
15621594

15631595
# Authentication setting

aspose_barcode_cloud/api_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ def __init__(self, configuration=None, header_name=None, header_value=None, cook
8282
# Use the pool property to lazily initialize the ThreadPool.
8383
self._pool = None
8484
self.rest_client = rest.RESTClientObject(configuration)
85-
self.default_headers = {"x-aspose-client": "python sdk", "x-aspose-client-version": "21.9.0"}
85+
self.default_headers = {"x-aspose-client": "python sdk", "x-aspose-client-version": "21.10.0"}
8686
if header_name is not None:
8787
self.default_headers[header_name] = header_value
8888
self.cookie = cookie
8989
# Set default User-Agent.
90-
self.user_agent = "Aspose-Barcode-SDK/21.9.0/python"
90+
self.user_agent = "Aspose-Barcode-SDK/21.10.0/python"
9191

9292
def __del__(self):
9393
if self._pool is not None:

aspose_barcode_cloud/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ def to_debug_report(self):
285285
"OS: {env}\n"
286286
"Python Version: {pyversion}\n"
287287
"Version of the API: 3.0\n"
288-
"SDK Package Version: 21.9.0".format(env=sys.platform, pyversion=sys.version)
288+
"SDK Package Version: 21.10.0".format(env=sys.platform, pyversion=sys.version)
289289
)
290290

291291
@staticmethod

0 commit comments

Comments
 (0)