Barcode.CalculateOptimalBitmapSize

Barcode

Size TECIT.TBarCode.Barcode.CalculateOptimalBitmapSize(Graphics gfx, int nScaleX, int nScaleY)

Calculates the optimal size of a bitmap.

Parameters

Parameter / typeDescription
gfx Graphics

The graphics object. If null, the bounding rectangle unit is [Pixel], otherwise [mm].

nScaleX int

The horizontal scale factor.

nScaleY int

The vertical scale factor.

Returns

The optimal bitmap size in pixel.

This function calculates the size of the bar code for an optimal pixel alignment (best quality). The returned values can be used for bitmap export. The actual bounding rectangle presets the default height (without HRT). In case of 2D symbologies the bounding rectangle has no influence. If the bar codes are rotated (90°/270°), you have to exchange width and height. Please note that only quiet zones given in modules or pixels are supported by this method.

Search documentation

Search in
More scopes
Additional scopes

All contents