BarcodeAddDecorationImage Method (String, Int32)
Add decorative image to draw in the center of the barcode. (!) Supported with QR Code only.
Namespace:Bytescout.BarCodeAssembly: Bytescout.BarCode (in Bytescout.BarCode.dll) Version: 7.6.3.1256-master
public void AddDecorationImage(
string imageFileName,
int scale
)
Public Sub AddDecorationImage (
imageFileName As String,
scale As Integer
)
public:
virtual void AddDecorationImage(
String^ imageFileName,
int scale
) sealed
abstract AddDecorationImage :
imageFileName : string *
scale : int -> unit
override AddDecorationImage :
imageFileName : string *
scale : int -> unit
Parameters
- imageFileName
- Type: SystemString
Image to add to barcode. - scale
- Type: SystemInt32
Scale of the image square relatively to the barcode square, in percents. Recommended is 15 percents with the highest error correction level. Set -1 to disable the scaling.
Implements
IBarcodeAddDecorationImage(String, Int32)Note, the embedded image damages the barcode, but the QR Code's error correction algorithm makes it possible to decode the damaged barcode if the damage doesn't exceed 7-30% of barcode square (depending on the error correction level). See
Options and
QRErrorCorrectionLevel. It's recommended to generate the QR Code with highest error correction level and check the barcode is still decodable after image applying. To read the barcode you can use ByteScout Barcode Reader SDK: https://bytescout.com/products/developer/barcodereadersdk/bytescoutbarcodereadersdk.html
Reference