yeahdongcn / RSBarcodes_Swift

1D and 2D barcodes reader and generators for iOS 8 with delightful controls. Now Swift.
MIT License
710 stars 185 forks source link

How to change color of resized barcode? #138

Open sotrosh opened 4 years ago

sotrosh commented 4 years ago

Hi, Here is a code I use to generate barcode:

RSUnifiedCodeGenerator.shared.strokeColor = .red RSUnifiedCodeGenerator.shared.fillColor = .blue result = RSUnifiedCodeGenerator.shared.generateCode("2166529V", machineReadableCodeObjectType: AVMetadataObject.ObjectType.aztec.rawValue) result = RSAbstractCodeGenerator.resizeImage(result, scale: 10)

The problem that after resizing the barcode doesn't keep colors I set before. How to set colors after image resizing?