s="message"> first 7 anos atrás MultiEntryPlugin.js 11e3a9652a first 7 anos atrás MultiModule.js 11e3a9652a first 7 anos atrás MultiModuleFactory.js 11e3a9652a first 7 anos atrás MultiStats.js 11e3a9652a first 7 anos atrás MultiWatching.js 11e3a9652a first 7 anos atrás NamedChunksPlugin.js 11e3a9652a first 7 anos atrás NamedModulesPlugin.js 11e3a9652a first 7 anos atrás NewWatchingPlugin.js 11e3a9652a first 7 anos atrás NoEmitOnErrorsPlugin.js 11e3a9652a first 7 anos atrás NoErrorsPlugin.js 11e3a9652a first 7 anos atrás NodeStuffPlugin.js 11e3a9652a first 7 anos atrás NormalModule.js 11e3a9652a first 7 anos atrás NormalModuleFactory.js 11e3a9652a first 7 anos atrás NormalModuleReplacementPlugin.js 11e3a9652a first 7 anos atrás NullFactory.js 11e3a9652a first 7 anos atrás OptionsApply.js 11e3a9652a first 7 anos atrás OptionsDefaulter.js 11e3a9652a first 7 anos atrás Parser.js 11e3a9652a first 7 anos atrás ParserHelpers.js 11e3a9652a first 7 anos atrás PrefetchPlugin.js 11e3a9652a first 7 anos atrás ProgressPlugin.js 11e3a9652a first 7 anos atrás ProvidePlugin.js 11e3a9652a first 7 anos atrás RawModule.js 11e3a9652a first 7 anos atrás RecordIdsPlugin.js 11e3a9652a first 7 anos atrás RequestShortener.js 11e3a9652a first 7 anos atrás RequireJsStuffPlugin.js 11e3a9652a first 7 anos atrás RuleSet.js 11e3a9652a first 7 anos atrás SetVarMainTemplatePlugin.js 11e3a9652a first 7 anos atrás SingleEntryPlugin.js 11e3a9652a first 7 anos atrás SizeFormatHelpers.js 11e3a9652a first 7 anos atrás SourceMapDevToolModuleOptionsPlugin.js 11e3a9652a first 7 anos atrás SourceMapDevToolPlugin.js 11e3a9652a first 7 anos atrás Stats.js 11e3a9652a first 7 anos atrás Template.js 11e3a9652a first 7 anos atrás TemplatedPathPlugin.js 11e3a9652a first 7 anos atrás UmdMainTemplatePlugin.js 11e3a9652a first 7 anos atrás UnsupportedFeatureWarning.js 11e3a9652a first 7 anos atrás UseStrictPlugin.js 11e3a9652a first 7 anos atrás WarnCaseSensitiveModulesPlugin.js 11e3a9652a first 7 anos atrás WatchIgnorePlugin.js 11e3a9652a first 7 anos atrás WebpackError.js 11e3a9652a first 7 anos atrás WebpackOptionsApply.js 11e3a9652a first 7 anos atrás WebpackOptionsDefaulter.js 11e3a9652a first 7 anos atrás WebpackOptionsValidationError.js 11e3a9652a first 7 anos atrás compareLocations.js 11e3a9652a first 7 anos atrás formatLocation.js 11e3a9652a first 7 anos atrás prepareOptions.js 11e3a9652a first 7 anos atrás removeAndDo.js 11e3a9652a first 7 anos atrás validateSchema.js 11e3a9652a first 7 anos atrás webpack.js 11e3a9652a first 7 anos atrás webpack.web.js 11e3a9652a first 7 anos atrás kodo - Gogs: Go Git Service

暂无描述

zbar.py 1.1KB

    # -*- coding: utf-8 -*- from django.conf import settings from PIL import Image, ImageEnhance from pyzbar import pyzbar # The zbar DLLs are included with the Windows Python wheels. # On other operating systems, you will need to install the zbar shared library. # # Mac OS X: # brew install zbar # # Linux: # sudo apt-get install libzbar0 # # Install this Python wrapper; use the second form to install dependencies of the command-line scripts: # pip install pyzbar def zbar(path): img = Image.open(path) # img = ImageEnhance.Brightness(img).enhance(2.0) # 增加亮度 # img = ImageEnhance.Sharpness(img).enhance(17.0) # 锐利化 # img = ImageEnhance.Contrast(img).enhance(4.0) # 增加对比度 # img = img.convert('L') # 灰度化 # img.show() barcodes = pyzbar.decode(img) # for barcode in barcodes: # barcodeData = barcode.data.decode("utf-8") # print(barcodeData) return [bar.data.decode('utf-8').strip() for bar in barcodes] def test_zbar(): # In[4]: test_zbar() # [u'189415'] print(zbar(settings.TESTING_ZBAR)) if __name__ == '__main__': test_zbar()