save

BarcodeGenerator.save

save(self, str imagePath, BarCodeImageFormat imageFormat)

Save barcode image to specific file in specific format.

ParameterTypeDescription
imagePathstrPath to save to.
imageFormatBarCodeImageFormatOptional format override. If omitted, the format to use is determined from the filename extension. If a file object was used instead of a filename, this parameter should always be used. generator = BarcodeGenerator(EncodeTypes.CODE_128, “123ABCDEFG”) generator.save(image_path_to_save3, BarCodeImageFormat.PNG)