Dev Center
Table of contents



Attribute Type
colourConversionModes number | EnumColourConversionMode
grayscaleTransformationModes number | EnumGrayscaleTransformationMode
regionPredetectionModes number | EnumRegionPredetectionMode
imagePreprocessingModes number | EnumImagePreprocessingMode
textureDetectionModes number | EnumTextureDetectionMode
dpmCodeReadingModes number | EnumDPMCodeReadingMode
deformationResistingModes number | EnumDeformationResistingMode
barcodeComplementModes number | EnumBarcodeComplementMode
barcodeColourModes number | EnumBarcodeColourMode


Sets the modes and their correspondent priorities when the SDK is required to convert a colour image to a grayscale one.

Value Range Please see the EnumColourConversionMode items.



This parameter should be mainly used when trying to read light on dark barcodes. By default, the SDK is configured to read dark on light barcodes.

Value Range An array of EnumGrayscaleTransformationMode items.


Remarks If you are primarily scanning dark on light barcodes, it is best to set the highest priority item in the array to GTM_INVERTED.

let runtimeSettings = await reader.getRuntimeSettings();
runtimeSettings.furtherModes.grayscaleTransformationModes[0] = Dynamsoft.DBR.EnumGrayscaleTransformationMode.GTM_INVERTED;
await reader.updateRuntimeSettings(runtimeSettings);


This parameters helps speed up the recognition process by detecting regions of interest automatically. Pre-detection is based on the colour/grayscale distribution of each area, and then choosing areas of interest based on the priority of the region predetction modes.

Value Range Array of EnumRegionPredetectionMode items.


Remarks If the image is large, and the barcode is very small relative to the whole image, then it is recommended to enable region predetction to speed up the localization process and recognition accuracy.

let runtimeSettings = await reader.getRuntimeSettings();
runtimeSettings.furtherModes.regionPredetectionModes[0] = Dynamsoft.DBR.EnumRegionPredetectionMode.RPM_GENERAL_RGB_CONTRAST;
runtimeSettings.furtherModes.regionPredetectionModes[1] = Dynamsoft.DBR.EnumRegionPredetectionMode.RPM_GENERAL;
await reader.updateRuntimeSettings(runtimeSettings);


This parameter helps enhance or keep the features of barcode zones by processing colour or grayscale images, in turn improving the localization process.

Value Range Array of EnumImagePreprocessingMode items.


Remarks In order for barcodes to be localized, the barcode must have clear barcode zone features that the algorithm uses to find the barcode and in turn recognize it. By enhancing some of the available zone features, the process of finding the barcode can also potentially become more effective.

let runtimeSettings = await reader.getRuntimeSettings();
runtimeSettings.furtherModes.imagePreprocessingModes[0] = Dynamsoft.DBR.EnumImagePreprocessingMode.IPM_GRAY_SMOOTH;
runtimeSettings.furtherModes.imagePreprocessingModes[1] = Dynamsoft.DBR.EnumImagePreprocessingMode.IPM_SHARPEN_SMOOTH;
await reader.updateRuntimeSettings(runtimeSettings);


When scanning 1D barcodes, this parameter helps reduce the time cost and error probability caused by textures that can resemble 1D barcodes.

Value Range Array of EnumTextureDetectionMode items.


Remarks Mainly applicable when scanning 1D barcodes.

let runtimeSettings = await reader.getRuntimeSettings();
runtimeSettings.furtherModes.textureDetectionModes[0] = Dynamsoft.DBR.EnumTextureDetectionMode.TDM_SKIP; // to disable this parameter completely
await reader.updateRuntimeSettings(runtimeSettings);


This parameter should only be enabled when working with DPM codes. By default, DPM reading is disabled.

Value Range Array of EnumDPMCodeReadingMode items


let runtimeSettings = await reader.getRuntimeSettings();
runtimeSettings.furtherModes.dpmCodeReadingModes[0] = Dynamsoft.DBR.EnumDPMCodeReadingMode.DPMCRM_GENERAL; // to enable DPM code reading set the highest priority item to General
await reader.updateRuntimeSettings(runtimeSettings);


This parameter should be used when handling distorted or deformed barcodes. Currently, there is only one general mode that deal with the deformation resistance, so if you are looking to enable this feature, then please refer to the code snippet.

Value Range Array of EnumDeformationResistingMode items


let runtimeSettings = await reader.getRuntimeSettings();
runtimeSettings.furtherModes.deformationResistingModes[0] = Dynamsoft.DBR.EnumDeformationResistingMode.DRM_GENERAL; // to enable deformation resistance set the highest priority item to General
await reader.updateRuntimeSettings(runtimeSettings);


When dealing with a barcode that has ‘missing’ parts, this parameter controls how to complement the missing parts of said barcode.

Value Range Array of EnumBarcodeComplementMode items


let runtimeSettings = await reader.getRuntimeSettings();
runtimeSettings.furtherModes.barcodeComplementModes[0] = Dynamsoft.DBR.EnumBarcodeComplementMode.BCM_GENERAL; // to enable the barcode complement feature set the highest priority item to General
await reader.updateRuntimeSettings(runtimeSettings);


Please note that this API is not yet applicable. Please use grayscaleTransformationModes instead.

In most cases, barcodes come as a dark image with a light background (e.g. black barcode on a white background). However, that is not always the case as the barcodes can come as a light image with a dark background, or some other variation.

Value Range Array of EnumBarcodeColourMode items


Remarks To learn about the purpose of each mode, please refer to this page.

let runtimeSettings = await reader.getRuntimeSettings();
runtimeSettings.furtherModes.barcodeColourModes[0] = Dynamsoft.DBR.EnumBarcodeColourMode.BICM_DARK_ON_LIGHT; // to support both dark-on-light and light-on-dark barcodes then the array must contain both modes.
runtimeSettings.furtherModes.barcodeColourModes[1] = Dynamsoft.DBR.EnumBarcodeColourMode.BICM_LIGHT_ON_DARK; // to support both dark-on-light and light-on-dark barcodes then the array must contain both modes.
await reader.updateRuntimeSettings(runtimeSettings);

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

latest version

    • Latest version(10.2.10)
    • Version 10.x
      • Version 10.0.21
      • Version 10.0.20
    • Version 9.x
      • Version 9.6.42
      • Version 9.6.40
      • Version 9.6.33
      • Version 9.6.32
      • Version 9.6.31
      • Version 9.6.30
      • Version 9.6.21
      • Version 9.6.20
      • Version 9.6.11
      • Version 9.6.10
      • Version 9.6.2
      • Version 9.6.1
      • Version 9.6.0
      • Version 9.3.1
      • Version 9.3.0
      • Version 9.2.13
      • Version 9.2.12
      • Version 9.2.11
      • Version 9.0.2
      • Version 9.0.1
      • Version 9.0.0
    • Version 8.x
      • Version 8.8.7
      • Version 8.8.5
      • Version 8.8.3
      • Version 8.8.0
      • Version 8.6.3
      • Version 8.6.0
      • Version 8.4.0
      • Version 8.2.5
      • Version 8.2.3
      • Version 8.2.1
      • Version 8.2.0
      • Version 8.1.3
      • Version 8.1.2
      • Version 8.1.0
      • Version 8.0.0
    • Version 7.x
      • Version 7.6.0
      • Version 7.5.0
    Change +