Skip to main content
A newer version of this page is available. .

BarCodeControl.ExportToImage(ImageFormat, Int32) Method

Creates an image of the bar code with the specified image format and resolution.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v19.2.dll

Declaration

public Image ExportToImage(
    ImageFormat format,
    int resolution
)

Parameters

Name Type Description
format ImageFormat

A ImageFormat object specifying the image format, such as PNG, BMP, or GIF, in which the bar code should be returned.

resolution Int32

An integer value specifying the horizontal and vertical resolution, in dots per inch, for the image to return.

Returns

Type Description
Image

A Image object specifying the currently displayed bar code as an image.

Remarks

Use the ExportToImage method to get the currently displayed bar code as an image in the specified format and resolution.

Image i = barCodeControl1.ToImage(System.Drawing.Imaging.ImageFormat.Bmp, 120);
i.Save("barcode.bmp");
See Also