aspose-barcode-for-python-via-java 24.6.0__tar.gz → 24.7.0__tar.gz
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.
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.7.0}/PKG-INFO +1 -1
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.7.0}/aspose_barcode_for_python_via_java.egg-info/PKG-INFO +1 -1
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.7.0}/aspose_barcode_for_python_via_java.egg-info/SOURCES.txt +1 -1
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.7.0}/asposebarcode/ComplexBarcode.py +10 -9
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.7.0}/asposebarcode/Generation.py +130 -16
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.7.0}/asposebarcode/Recognition.py +35 -38
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.7.0}/asposebarcode/__init__.py +1 -1
- aspose-barcode-for-python-via-java-24.6.0/asposebarcode/jlib/aspose-barcode-python-24.6.jar → aspose-barcode-for-python-via-java-24.7.0/asposebarcode/jlib/aspose-barcode-python-24.7.jar +0 -0
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.7.0}/setup.py +1 -1
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.7.0}/MANIFEST.in +0 -0
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.7.0}/README.md +0 -0
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.7.0}/aspose_barcode_for_python_via_java.egg-info/dependency_links.txt +0 -0
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.7.0}/aspose_barcode_for_python_via_java.egg-info/requires.txt +0 -0
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.7.0}/aspose_barcode_for_python_via_java.egg-info/top_level.txt +0 -0
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.7.0}/asposebarcode/Assist.py +0 -0
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.7.0}/license/End+User+License+Agreement.html +0 -0
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.7.0}/license/ThirdPartyLicenses.Aspose.BarCode.Java.pdf +0 -0
- {aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.7.0}/setup.cfg +0 -0
{aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.7.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: aspose-barcode-for-python-via-java
|
|
3
|
-
Version: 24.
|
|
3
|
+
Version: 24.7.0
|
|
4
4
|
Summary: Barcode generation and recognition component. It allows developers to quickly and easily add barcode creation and scanning functionality to their Python applications.
|
|
5
5
|
Home-page: UNKNOWN
|
|
6
6
|
Author: Aspose
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: aspose-barcode-for-python-via-java
|
|
3
|
-
Version: 24.
|
|
3
|
+
Version: 24.7.0
|
|
4
4
|
Summary: Barcode generation and recognition component. It allows developers to quickly and easily add barcode creation and scanning functionality to their Python applications.
|
|
5
5
|
Home-page: UNKNOWN
|
|
6
6
|
Author: Aspose
|
|
@@ -11,6 +11,6 @@ asposebarcode/ComplexBarcode.py
|
|
|
11
11
|
asposebarcode/Generation.py
|
|
12
12
|
asposebarcode/Recognition.py
|
|
13
13
|
asposebarcode/__init__.py
|
|
14
|
-
asposebarcode/jlib/aspose-barcode-python-24.
|
|
14
|
+
asposebarcode/jlib/aspose-barcode-python-24.7.jar
|
|
15
15
|
license/End+User+License+Agreement.html
|
|
16
16
|
license/ThirdPartyLicenses.Aspose.BarCode.Java.pdf
|
|
@@ -122,16 +122,17 @@ class Address(Assist.BaseJavaClass):
|
|
|
122
122
|
"""
|
|
123
123
|
javaClassName = "com.aspose.mw.barcode.complexbarcode.MwAddress"
|
|
124
124
|
|
|
125
|
-
def __init__(self
|
|
126
|
-
|
|
125
|
+
def __init__(self):
|
|
126
|
+
jclass = jpype.JClass(Address.javaClassName)
|
|
127
|
+
super().__init__(jclass())
|
|
127
128
|
self.init()
|
|
128
129
|
|
|
129
130
|
@staticmethod
|
|
130
|
-
def
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
return
|
|
131
|
+
def construct(javaClass):
|
|
132
|
+
address = Address()
|
|
133
|
+
address.setJavaClass(javaClass)
|
|
134
|
+
address.init()
|
|
135
|
+
return address
|
|
135
136
|
|
|
136
137
|
def getType(self):
|
|
137
138
|
"""!
|
|
@@ -520,8 +521,8 @@ class SwissQRBill(Assist.BaseJavaClass):
|
|
|
520
521
|
"""
|
|
521
522
|
|
|
522
523
|
def init(self):
|
|
523
|
-
self.creditor = Address(self.getJavaClass().getCreditor())
|
|
524
|
-
self.debtor = Address(self.getJavaClass().getDebtor())
|
|
524
|
+
self.creditor = Address.construct(self.getJavaClass().getCreditor())
|
|
525
|
+
self.debtor = Address.construct(self.getJavaClass().getDebtor())
|
|
525
526
|
|
|
526
527
|
def __init__(self, javaClass):
|
|
527
528
|
self.creditor = None
|
|
@@ -3952,8 +3952,9 @@ class ImageParameters(Assist.BaseJavaClass):
|
|
|
3952
3952
|
"""
|
|
3953
3953
|
|
|
3954
3954
|
def __init__(self, javaClass):
|
|
3955
|
-
super().__init__(javaClass)
|
|
3956
3955
|
self.svg = None
|
|
3956
|
+
super().__init__(javaClass)
|
|
3957
|
+
|
|
3957
3958
|
|
|
3958
3959
|
|
|
3959
3960
|
def init(self):
|
|
@@ -3963,6 +3964,7 @@ class ImageParameters(Assist.BaseJavaClass):
|
|
|
3963
3964
|
"""!
|
|
3964
3965
|
SVG parameters
|
|
3965
3966
|
"""
|
|
3967
|
+
# self.svg = self.getJavaClass().getSvg()
|
|
3966
3968
|
return self.svg
|
|
3967
3969
|
|
|
3968
3970
|
def setSvg(self, svg):
|
|
@@ -4011,6 +4013,105 @@ class SvgParameters(Assist.BaseJavaClass):
|
|
|
4011
4013
|
"""
|
|
4012
4014
|
self.getJavaClass().setTextDrawnInTextElement(textDrawnInTextElement)
|
|
4013
4015
|
|
|
4016
|
+
|
|
4017
|
+
def setSvgColorMode(self,svgColorMode):
|
|
4018
|
+
"""!
|
|
4019
|
+
Possible modes for filling color in svg file, RGB is default and supported by SVG 1.1.
|
|
4020
|
+
RGBA, HSL, HSLA is allowed in SVG 2.0 standard.
|
|
4021
|
+
Even in RGB opacity will be set through "fill-opacity" parameter
|
|
4022
|
+
"""
|
|
4023
|
+
self.getJavaClass().setSvgColorMode(svgColorMode.value)
|
|
4024
|
+
|
|
4025
|
+
def getSvgColorMode(self):
|
|
4026
|
+
"""!
|
|
4027
|
+
Possible modes for filling color in svg file, RGB is default and supported by SVG 1.1.
|
|
4028
|
+
RGBA, HSL, HSLA is allowed in SVG 2.0 standard.
|
|
4029
|
+
Even in RGB opacity will be set through "fill-opacity" parameter
|
|
4030
|
+
"""
|
|
4031
|
+
return SvgColorMode(self.getJavaClass().getSvgColorMode())
|
|
4032
|
+
|
|
4033
|
+
class HslaColor:
|
|
4034
|
+
"""!
|
|
4035
|
+
Class for representing HSLA color (Hue, Saturation, Lightness, Alpha)
|
|
4036
|
+
"""
|
|
4037
|
+
|
|
4038
|
+
def __init__(self, h, s, l, a):
|
|
4039
|
+
"""!
|
|
4040
|
+
Constructor for HslaColor
|
|
4041
|
+
@param h: Hue [0, 360]
|
|
4042
|
+
@param s: Saturation [0, 100]
|
|
4043
|
+
@param l: Lightness [0, 100]
|
|
4044
|
+
@param a: Alpha (opacity) [0.0f, 1.0f]
|
|
4045
|
+
"""
|
|
4046
|
+
self.checkHue(h)
|
|
4047
|
+
self.checkSatLight(s)
|
|
4048
|
+
self.checkSatLight(l)
|
|
4049
|
+
self.checkAlpha(a)
|
|
4050
|
+
|
|
4051
|
+
self.H = h
|
|
4052
|
+
self.S = s
|
|
4053
|
+
self.L = l
|
|
4054
|
+
self.A = a
|
|
4055
|
+
|
|
4056
|
+
@staticmethod
|
|
4057
|
+
def checkHue(value):
|
|
4058
|
+
if (value < 0 or value > 360):
|
|
4059
|
+
raise Exception("Wrong color value")
|
|
4060
|
+
|
|
4061
|
+
@staticmethod
|
|
4062
|
+
def checkSatLight(value):
|
|
4063
|
+
if (value < 0 or value > 100):
|
|
4064
|
+
raise Exception("Wrong color value")
|
|
4065
|
+
|
|
4066
|
+
@staticmethod
|
|
4067
|
+
def checkAlpha(value):
|
|
4068
|
+
if ((value < 0.0) or (value > 1.0)):
|
|
4069
|
+
raise Exception("Wrong color value")
|
|
4070
|
+
|
|
4071
|
+
@staticmethod
|
|
4072
|
+
def convertHslaToRgba(hslaColor):
|
|
4073
|
+
r = 0
|
|
4074
|
+
g = 0
|
|
4075
|
+
b = 0
|
|
4076
|
+
|
|
4077
|
+
hueF = hslaColor.H / 360.0
|
|
4078
|
+
satF = hslaColor.S / 100.0
|
|
4079
|
+
lightF = hslaColor.L / 100.0
|
|
4080
|
+
|
|
4081
|
+
if (satF == 0):
|
|
4082
|
+
r = g = b = lightF
|
|
4083
|
+
else :
|
|
4084
|
+
if lightF < 0.5:
|
|
4085
|
+
q = lightF * (1 + satF)
|
|
4086
|
+
else:
|
|
4087
|
+
q = lightF + satF - lightF * satF
|
|
4088
|
+
p = 2 * lightF - q
|
|
4089
|
+
|
|
4090
|
+
r = HslaColor.hueToRgb(p, q, hueF + 1.0 / 3.0)
|
|
4091
|
+
g = HslaColor.hueToRgb(p, q, hueF)
|
|
4092
|
+
b = HslaColor.hueToRgb(p, q, hueF - 1.0 / 3.0)
|
|
4093
|
+
|
|
4094
|
+
rI = int(r * 255 + 0.5)
|
|
4095
|
+
gI = int(g * 255 + 0.5)
|
|
4096
|
+
bI = int(b * 255 + 0.5)
|
|
4097
|
+
aI = int(hslaColor.A * 255 + 0.5)
|
|
4098
|
+
|
|
4099
|
+
return ( rI, gI, bI, aI)
|
|
4100
|
+
|
|
4101
|
+
@staticmethod
|
|
4102
|
+
def hueToRgb(p, q, t):
|
|
4103
|
+
if (t < 0.0):
|
|
4104
|
+
t += 1.0
|
|
4105
|
+
if (t > 1.0):
|
|
4106
|
+
t -= 1.0
|
|
4107
|
+
if (t < 1.0 / 6.0):
|
|
4108
|
+
return p + (q - p) * 6.0 * t
|
|
4109
|
+
if (t < 1.0 / 2.0):
|
|
4110
|
+
return q
|
|
4111
|
+
if (t < 2.0 / 3.0):
|
|
4112
|
+
return p + (q - p) * (2.0 / 3.0 - t) * 6.0
|
|
4113
|
+
return p
|
|
4114
|
+
|
|
4014
4115
|
class MacroCharacter(Enum):
|
|
4015
4116
|
"""!
|
|
4016
4117
|
Macro Characters 05 and 06 values are used to obtain more compact encoding in special modes.
|
|
@@ -4802,17 +4903,14 @@ class EncodeTypes(Enum):
|
|
|
4802
4903
|
## Specifies that the data should be encoded with CODE 11 barcode specification
|
|
4803
4904
|
CODE_11 = 1
|
|
4804
4905
|
|
|
4805
|
-
## Specifies that the data should be encoded with
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
## Specifies that the data should be encoded with Extended CODE 39 barcode specification
|
|
4809
|
-
CODE_39_EXTENDED = 3
|
|
4906
|
+
## Specifies that the data should be encoded with {@code <b>Code 39</b>} basic charset barcode specification: ISO/IEC 16388
|
|
4907
|
+
CODE_39 = 2
|
|
4810
4908
|
|
|
4811
|
-
## Specifies that the data should be encoded with
|
|
4812
|
-
|
|
4909
|
+
## Specifies that the data should be encoded with {@code <b>Code 39</b>} full ASCII charset barcode specification: ISO/IEC 16388
|
|
4910
|
+
CODE_39_FULL_ASCII = 3
|
|
4813
4911
|
|
|
4814
|
-
## Specifies that the data should be encoded with
|
|
4815
|
-
|
|
4912
|
+
## Specifies that the data should be encoded with {@code <b>CODE 93</b>} barcode specification
|
|
4913
|
+
CODE_93 = 5
|
|
4816
4914
|
|
|
4817
4915
|
## Specifies that the data should be encoded with CODE 128 barcode specification
|
|
4818
4916
|
CODE_128 = 6
|
|
@@ -5066,16 +5164,13 @@ class EncodeTypes(Enum):
|
|
|
5066
5164
|
elif encodeTypeName == "CODE_11":
|
|
5067
5165
|
return 1
|
|
5068
5166
|
|
|
5069
|
-
elif encodeTypeName == "
|
|
5167
|
+
elif encodeTypeName == "CODE_39":
|
|
5070
5168
|
return 2
|
|
5071
5169
|
|
|
5072
|
-
elif encodeTypeName == "
|
|
5170
|
+
elif encodeTypeName == "CODE_39_FULL_ASCII":
|
|
5073
5171
|
return 3
|
|
5074
5172
|
|
|
5075
|
-
elif encodeTypeName == "
|
|
5076
|
-
return 4
|
|
5077
|
-
|
|
5078
|
-
elif encodeTypeName == "CODE_93_EXTENDED":
|
|
5173
|
+
elif encodeTypeName == "CODE_93":
|
|
5079
5174
|
return 5
|
|
5080
5175
|
|
|
5081
5176
|
elif encodeTypeName == "CODE_128":
|
|
@@ -6640,3 +6735,22 @@ class RectMicroQRVersion(Enum):
|
|
|
6640
6735
|
R17x99 = 31
|
|
6641
6736
|
# Specifies version with 17 x 139 modules.
|
|
6642
6737
|
R17x139 = 32
|
|
6738
|
+
|
|
6739
|
+
class SvgColorMode(Enum):
|
|
6740
|
+
"""!
|
|
6741
|
+
Possible modes for filling color in svg file, RGB is default and supported by SVG 1.1.
|
|
6742
|
+
RGBA, HSL, HSLA is allowed in SVG 2.0 standard.
|
|
6743
|
+
Even in RGB opacity will be set through "fill-opacity" parameter
|
|
6744
|
+
"""
|
|
6745
|
+
|
|
6746
|
+
## RGB mode, example: fill="#ff5511" fill-opacity="0.73". Default mode.
|
|
6747
|
+
RGB = 0
|
|
6748
|
+
|
|
6749
|
+
## RGBA mode, example: fill="rgba(255, 85, 17, 0.73)"
|
|
6750
|
+
RGBA = 1
|
|
6751
|
+
|
|
6752
|
+
## HSL mode, example: fill="hsl(17, 100%, 53%)" fill-opacity="0.73"
|
|
6753
|
+
HSL = 2
|
|
6754
|
+
|
|
6755
|
+
## HSLA mode, example: fill="hsla(30, 50%, 70%, 0.8)"
|
|
6756
|
+
HSLA = 3
|
|
@@ -20,7 +20,7 @@ class BarCodeReader(Assist.BaseJavaClass):
|
|
|
20
20
|
|
|
21
21
|
This sample shows how to detect Code39 and Code128 barcodes.
|
|
22
22
|
\code
|
|
23
|
-
reader = Recognition.BarCodeReader("test.png", None, [DecodeType.
|
|
23
|
+
reader = Recognition.BarCodeReader("test.png", None, [DecodeType.CODE_39, DecodeType.CODE_128])
|
|
24
24
|
for result in reader.readBarCodes():
|
|
25
25
|
print("BarCode Type: " + result.getCodeTypeName())
|
|
26
26
|
print("BarCode CodeText: " + result.getCodeText())
|
|
@@ -154,7 +154,7 @@ class BarCodeReader(Assist.BaseJavaClass):
|
|
|
154
154
|
|
|
155
155
|
This sample shows how to read barcodes with BarCodeReader
|
|
156
156
|
\code
|
|
157
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
157
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
158
158
|
reader.readBarCodes()
|
|
159
159
|
for(let i = 0 reader.getFoundCount() > i ++i)
|
|
160
160
|
print("BarCode CodeText: " + reader.getFoundBarCodes()[i].getCodeText())
|
|
@@ -169,7 +169,7 @@ class BarCodeReader(Assist.BaseJavaClass):
|
|
|
169
169
|
|
|
170
170
|
This sample shows how to read barcodes with BarCodeReader
|
|
171
171
|
\code
|
|
172
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
172
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
173
173
|
reader.readBarCodes()
|
|
174
174
|
for(let i = 0 reader.getFoundCount() > i ++i)
|
|
175
175
|
print("BarCode CodeText: " + reader.getFoundBarCodes()[i].getCodeText())
|
|
@@ -184,10 +184,10 @@ class BarCodeReader(Assist.BaseJavaClass):
|
|
|
184
184
|
|
|
185
185
|
This sample shows how to read barcodes with BarCodeReader
|
|
186
186
|
\code
|
|
187
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
187
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
188
188
|
for result in reader.readBarCodes():
|
|
189
189
|
print("BarCode CodeText: " + result.getCodeText())
|
|
190
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
190
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
191
191
|
reader.readBarCodes()
|
|
192
192
|
for(let i = 0 reader.getFoundCount() > i ++i)
|
|
193
193
|
print("BarCode CodeText: " + reader.getFoundBarCodes()[i].getCodeText())
|
|
@@ -225,11 +225,11 @@ class BarCodeReader(Assist.BaseJavaClass):
|
|
|
225
225
|
reader.setQualitySettings(QualitySettings.getHighPerformance())
|
|
226
226
|
for result in reader.readBarCodes():
|
|
227
227
|
print("BarCode CodeText: " + result.getCodeText())
|
|
228
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
228
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
229
229
|
#normal quality mode is set by default
|
|
230
230
|
for result in reader.readBarCodes():
|
|
231
231
|
print("BarCode CodeText: " + result.getCodeText())
|
|
232
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
232
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
233
233
|
#set high performance mode
|
|
234
234
|
reader.setQualitySettings(QualitySettings.getHighPerformance())
|
|
235
235
|
#set separate options
|
|
@@ -254,16 +254,16 @@ class BarCodeReader(Assist.BaseJavaClass):
|
|
|
254
254
|
|
|
255
255
|
This sample shows how to use QualitySettings with BarCodeReader
|
|
256
256
|
\code
|
|
257
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
257
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
258
258
|
#set high performance mode
|
|
259
259
|
reader.setQualitySettings(QualitySettings.getHighPerformance())
|
|
260
260
|
for result in reader.readBarCodes():
|
|
261
261
|
print("BarCode CodeText: " + result.getCodeText())
|
|
262
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
262
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
263
263
|
#normal quality mode is set by default
|
|
264
264
|
for result in reader.readBarCodes():
|
|
265
265
|
print("BarCode CodeText: " + result.getCodeText())
|
|
266
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
266
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
267
267
|
#set high performance mode
|
|
268
268
|
reader.setQualitySettings(QualitySettings.getHighPerformance())
|
|
269
269
|
#set separate options
|
|
@@ -294,7 +294,7 @@ class BarCodeReader(Assist.BaseJavaClass):
|
|
|
294
294
|
\code
|
|
295
295
|
let bmp = "test.png"
|
|
296
296
|
reader = Recognition.BarCodeReader()
|
|
297
|
-
reader.setBarCodeReadType([ DecodeType.
|
|
297
|
+
reader.setBarCodeReadType([ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
298
298
|
var img = Image()
|
|
299
299
|
img.src = 'path_to_image'
|
|
300
300
|
width = img.width
|
|
@@ -321,7 +321,7 @@ class BarCodeReader(Assist.BaseJavaClass):
|
|
|
321
321
|
This sample shows how to detect Code39 and Code128 barcodes.
|
|
322
322
|
\code
|
|
323
323
|
reader = Recognition.BarCodeReader()
|
|
324
|
-
reader.setBarCodeReadType([ DecodeType.
|
|
324
|
+
reader.setBarCodeReadType([ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
325
325
|
reader.setBarCodeImage("test.png")
|
|
326
326
|
for result in reader.readBarCodes():
|
|
327
327
|
print("BarCode Type: " + result.getCodeTypeName())
|
|
@@ -893,7 +893,7 @@ class BarCodeResult(Assist.BaseJavaClass):
|
|
|
893
893
|
\code
|
|
894
894
|
generator = BarcodeGenerator(EncodeTypes.Code128, "12345")
|
|
895
895
|
generator.save("test.png", BarCodeImageFormat.PNG)
|
|
896
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
896
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
897
897
|
for result in reader.readBarCodes():
|
|
898
898
|
print("BarCode Type: " + result.getCodeTypeName())
|
|
899
899
|
print("BarCode CodeText: " + result.getCodeText())
|
|
@@ -1004,7 +1004,7 @@ class BarCodeRegionParameters(Assist.BaseJavaClass):
|
|
|
1004
1004
|
\code
|
|
1005
1005
|
generator = BarcodeGenerator(EncodeTypes.Code128, "12345")
|
|
1006
1006
|
generator.save("test.png", BarCodeImageFormat.PNG)
|
|
1007
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
1007
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
1008
1008
|
for result in reader.readBarCodes():
|
|
1009
1009
|
print("BarCode CodeText: " + result.getCodeText())
|
|
1010
1010
|
print("BarCode Angle: " + result.getRegion().getAngle())
|
|
@@ -1214,34 +1214,34 @@ class QualitySettings(Assist.BaseJavaClass):
|
|
|
1214
1214
|
Default value of QualitySettings is NormalQuality.
|
|
1215
1215
|
This sample shows how to use QualitySettings with BarCodeReader
|
|
1216
1216
|
\code
|
|
1217
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
1217
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
1218
1218
|
#set high performance mode
|
|
1219
1219
|
reader.setQualitySettings(QualitySettings.getHighPerformance())
|
|
1220
1220
|
for result in reader.readBarCodes():
|
|
1221
1221
|
print("BarCode CodeText: " + result.getCodeText())
|
|
1222
1222
|
\endcode
|
|
1223
1223
|
\code
|
|
1224
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
1224
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
1225
1225
|
#normal quality mode is set by default
|
|
1226
1226
|
for result in reader.readBarCodes():
|
|
1227
1227
|
print("BarCode CodeText: " + result.getCodeText())
|
|
1228
1228
|
\endcode
|
|
1229
1229
|
\code
|
|
1230
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
1230
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
1231
1231
|
#set high quality mode with low speed recognition
|
|
1232
1232
|
reader.setQualitySettings(QualitySettings.getHighQuality())
|
|
1233
1233
|
for result in reader.readBarCodes():
|
|
1234
1234
|
print("BarCode CodeText: " + result.getCodeText())
|
|
1235
1235
|
\endcode
|
|
1236
1236
|
\code
|
|
1237
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
1237
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
1238
1238
|
#set max barcodes mode, which tries to find all possible barcodes, even incorrect. The slowest recognition mode
|
|
1239
1239
|
reader.setQualitySettings(QualitySettings.getMaxBarCodes())
|
|
1240
1240
|
for result in reader.readBarCodes():
|
|
1241
1241
|
print("BarCode CodeText: " + result.getCodeText())
|
|
1242
1242
|
\endcode
|
|
1243
1243
|
\code
|
|
1244
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
1244
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
1245
1245
|
#set high performance mode
|
|
1246
1246
|
reader.setQualitySettings(QualitySettings.getHighPerformance())
|
|
1247
1247
|
#set separate options
|
|
@@ -1251,7 +1251,7 @@ class QualitySettings(Assist.BaseJavaClass):
|
|
|
1251
1251
|
print("BarCode CodeText: " + result.getCodeText())
|
|
1252
1252
|
\endcode
|
|
1253
1253
|
\code
|
|
1254
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
1254
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
1255
1255
|
#default mode is NormalQuality
|
|
1256
1256
|
#set separate options
|
|
1257
1257
|
reader.getQualitySettings().setAllowMedianSmoothing(true)
|
|
@@ -1322,7 +1322,7 @@ class QualitySettings(Assist.BaseJavaClass):
|
|
|
1322
1322
|
* </p><p><hr><blockquote><pre>
|
|
1323
1323
|
This sample shows how to use MaxQuality mode
|
|
1324
1324
|
|
|
1325
|
-
reader = new BarCodeReader("test.png"null, null, DecodeType::
|
|
1325
|
+
reader = new BarCodeReader("test.png"null, null, DecodeType::CODE_39_FULL_ASCII, DecodeType::CODE_128)
|
|
1326
1326
|
$reader->setQualitySettings(QualitySettings::getMaxQuality());
|
|
1327
1327
|
foreach($reader->readBarCodes() as $result)
|
|
1328
1328
|
echo ($result->getCodeText());
|
|
@@ -2248,7 +2248,7 @@ class DecodeType(Enum):
|
|
|
2248
2248
|
Specify the type of barcode to read.
|
|
2249
2249
|
This sample shows how to detect Code39 and Code128 barcodes.
|
|
2250
2250
|
\code
|
|
2251
|
-
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.
|
|
2251
|
+
reader = Recognition.BarCodeReader("test.png", None, [ DecodeType.CODE_39, DecodeType.CODE_128 ])
|
|
2252
2252
|
for result in reader.readBarCodes():
|
|
2253
2253
|
print("BarCode Type: " + result.getCodeTypeName())
|
|
2254
2254
|
print("BarCode CodeText: " + result.getCodeText())
|
|
@@ -2264,17 +2264,14 @@ class DecodeType(Enum):
|
|
|
2264
2264
|
## Specifies that the data should be decoded with {@code <b>CODE 11</b>} barcode specification
|
|
2265
2265
|
CODE_11 = 1
|
|
2266
2266
|
|
|
2267
|
-
##
|
|
2268
|
-
|
|
2267
|
+
## Specifies that the data should be decoded with {@code <b>Code 39</b>} basic charset barcode specification: ISO/IEC 16388
|
|
2268
|
+
CODE_39 = 2
|
|
2269
2269
|
|
|
2270
|
-
## Specifies that the data should be decoded with {@code <b>
|
|
2271
|
-
|
|
2270
|
+
## Specifies that the data should be decoded with {@code <b>Code 39</b>} full ASCII charset barcode specification: ISO/IEC 16388
|
|
2271
|
+
CODE_39_FULL_ASCII = 3
|
|
2272
2272
|
|
|
2273
|
-
##
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
## Specifies that the data should be decoded with {@code <b>Extended CODE 93</b>} barcode specification
|
|
2277
|
-
CODE_93_EXTENDED = 5
|
|
2273
|
+
## Specifies that the data should be decoded with {@code <b>CODE 93</b>} barcode specification
|
|
2274
|
+
CODE_93 = 5
|
|
2278
2275
|
|
|
2279
2276
|
## Specifies that the data should be decoded with {@code <b>CODE 128</b>} barcode specification
|
|
2280
2277
|
CODE_128 = 6
|
|
@@ -2633,7 +2630,7 @@ class BarCodeConfidence(Enum):
|
|
|
2633
2630
|
#Moderate confidence
|
|
2634
2631
|
generator = BarcodeGenerator(EncodeTypes.CODE_128, "12345")
|
|
2635
2632
|
generator.save("test.png", BarCodeImageFormat.PNG)
|
|
2636
|
-
reader = Recognition.BarCodeReader("test.png", None, [DecodeType.
|
|
2633
|
+
reader = Recognition.BarCodeReader("test.png", None, [DecodeType.CODE_39, DecodeType.CODE_128])
|
|
2637
2634
|
for result in reader.readBarCodes():
|
|
2638
2635
|
print("BarCode Type: " + result.getCodeTypeName())
|
|
2639
2636
|
print("BarCode CodeText: " + result.getCodeText())
|
|
@@ -2644,7 +2641,7 @@ class BarCodeConfidence(Enum):
|
|
|
2644
2641
|
\code
|
|
2645
2642
|
generator = BarcodeGenerator(EncodeTypes.QR, "12345")
|
|
2646
2643
|
generator.save("test.png", BarCodeImageFormat.PNG)
|
|
2647
|
-
reader = Recognition.BarCodeReader("test.png", None, [DecodeType.
|
|
2644
|
+
reader = Recognition.BarCodeReader("test.png", None, [DecodeType.CODE_39, DecodeType.QR])
|
|
2648
2645
|
for result in reader.readBarCodes():
|
|
2649
2646
|
print("BarCode Type: " + result.getCodeTypeName())
|
|
2650
2647
|
print("BarCode CodeText: " + result.getCodeText())
|
|
@@ -2719,7 +2716,7 @@ class DeconvolutionMode(Enum):
|
|
|
2719
2716
|
This sample shows how to use Deconvolution mode
|
|
2720
2717
|
|
|
2721
2718
|
\code
|
|
2722
|
-
reader = Recognition.BarCodeReader("test.png", None, [Recognition.DecodeType.
|
|
2719
|
+
reader = Recognition.BarCodeReader("test.png", None, [Recognition.DecodeType.CODE_39_FULL_ASCII, Recognition.DecodeType.CODE_128])
|
|
2723
2720
|
reader.getQualitySettings().setDeconvolution(Recognition.DeconvolutionMode.SLOW)
|
|
2724
2721
|
for result in reader.readBarCodes():
|
|
2725
2722
|
console.log("BarCode CodeText: " + result.getCodeText())
|
|
@@ -2737,7 +2734,7 @@ class InverseImageMode(Enum):
|
|
|
2737
2734
|
"""!
|
|
2738
2735
|
Mode which enables or disables additional recognition of barcodes on images with inverted colors (luminance).
|
|
2739
2736
|
\code
|
|
2740
|
-
reader = Recognition.BarCodeReader("test.png", None, [Recognition.DecodeType.
|
|
2737
|
+
reader = Recognition.BarCodeReader("test.png", None, [Recognition.DecodeType.CODE_39_FULL_ASCII, Recognition.DecodeType.CODE_128])
|
|
2741
2738
|
reader.getQualitySettings().setInverseImage(Recognition.InverseImageMode.ENABLED)
|
|
2742
2739
|
for result in reader.readBarCodes():
|
|
2743
2740
|
console.log("BarCode CodeText: " + result.getCodeText())
|
|
@@ -2759,7 +2756,7 @@ class XDimensionMode(Enum):
|
|
|
2759
2756
|
|
|
2760
2757
|
This sample shows how to use XDimension mode
|
|
2761
2758
|
\code
|
|
2762
|
-
reader = Recognition.BarCodeReader("test.png", None, [Recognition.DecodeType.
|
|
2759
|
+
reader = Recognition.BarCodeReader("test.png", None, [Recognition.DecodeType.CODE_39_FULL_ASCII, Recognition.DecodeType.CODE_128])
|
|
2763
2760
|
reader.getQualitySettings().setXDimension(XDimensionMode.SMALL)
|
|
2764
2761
|
for result in reader.readBarCodes():
|
|
2765
2762
|
console.log("BarCode CodeText: " + result.getCodeText())
|
|
@@ -2784,7 +2781,7 @@ class ComplexBackgroundMode(Enum):
|
|
|
2784
2781
|
"""!
|
|
2785
2782
|
Mode which enables or disables additional recognition of color barcodes on color images.
|
|
2786
2783
|
\code
|
|
2787
|
-
reader = Recognition.BarCodeReader("test.png", None, [Recognition.DecodeType.
|
|
2784
|
+
reader = Recognition.BarCodeReader("test.png", None, [Recognition.DecodeType.CODE_39_FULL_ASCII, Recognition.DecodeType.CODE_128])
|
|
2788
2785
|
reader.getQualitySettings().setComplexBackground(ComplexBackgroundMode.ENABLED)
|
|
2789
2786
|
for result in reader.readBarCodes():
|
|
2790
2787
|
console.log("BarCode CodeText: " + result.getCodeText())
|
|
@@ -2802,7 +2799,7 @@ class BarcodeQualityMode(Enum):
|
|
|
2802
2799
|
"""!
|
|
2803
2800
|
Mode which enables methods to recognize barcode elements with the selected quality. Barcode element with lower quality requires more hard methods which slows the recognition.
|
|
2804
2801
|
\code
|
|
2805
|
-
reader = Recognition.BarCodeReader("test.png", None, [Recognition.DecodeType.
|
|
2802
|
+
reader = Recognition.BarCodeReader("test.png", None, [Recognition.DecodeType.CODE_39_FULL_ASCII, Recognition.DecodeType.CODE_128])
|
|
2806
2803
|
reader.getQualitySettings().setBarcodeQuality(BarcodeQualityMode.LOW)
|
|
2807
2804
|
for result in reader.readBarCodes():
|
|
2808
2805
|
console.log("BarCode CodeText: " + result.getCodeText())
|
|
@@ -3,6 +3,6 @@ import os
|
|
|
3
3
|
from asposebarcode import Generation, Recognition, Assist
|
|
4
4
|
|
|
5
5
|
__asposebarcode_dir__ = os.path.dirname(__file__)
|
|
6
|
-
__barcode_jar_path__ = __asposebarcode_dir__ + "/jlib/aspose-barcode-python-24.
|
|
6
|
+
__barcode_jar_path__ = __asposebarcode_dir__ + "/jlib/aspose-barcode-python-24.7.jar"
|
|
7
7
|
jpype.startJVM(jpype.getDefaultJVMPath(), "-Djava.class.path=%s" % __barcode_jar_path__)
|
|
8
8
|
__all__ = ['Assist','Recognition','Generation','ComplexBarcode']
|
{aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.7.0}/MANIFEST.in
RENAMED
|
File without changes
|
{aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.7.0}/README.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aspose-barcode-for-python-via-java-24.6.0 → aspose-barcode-for-python-via-java-24.7.0}/setup.cfg
RENAMED
|
File without changes
|