TBarCode Library 11  TBarCode Library 11

◆ BCSaveImageExA()

ERRCODE TECIT_STDCALL BCSaveImageExA ( t_BarCode pBarCode,
HDC  hDC,
LPCSTR  lpszFileName,
e_IMType  eImageType,
LONG  lQuality,
LONG  lXSize,
LONG  lYSize,
DOUBLE  dXRes,
DOUBLE  dYRes 
)

Saves barcode to an image-file (extended version, Windows only).

Saves the content of the barcode object as image-file with respect to a specified device context (if not needed hDC can be set to 0). The values of lXSize and lYSize should be increased, if the barcode is not readable or if the data density is high. The values of dXRes and dYRes can affect the printing size when printing from graphic- or painting programs.
The image quality sets the compression algorithm (depending on the image type):

  • BMP 0 = no compression, nonzero = RLE8 compression
  • PNG 0 = all filters, 2 = no filter, 4 = sub filter, 6 = up filter, 8 = avg filter, 10 = paeth filter; 1 (bit 0 set) = interlaced
  • JPG 0 = lowest quality (maximum compression), 100 = highest quality
  • TIF 0 = no compression, 1 = LZW, 2 = packbits, 3 = CCITT Group 3 1D, 4 = CCITT Group 4 2D
  • EPS 0 = include PS drawing macros, 1 = exclude macros (value applied to buffer output only!)

A file extension according to selected image type is appended automatically if the file name does not already end with a safe file extension. Safe file extensions are ".ai", ".bmp", ".emf", ".eps", ".gif", ".jpg", ".jpeg", ".pcl", ".pcx", ".png", ".svg", ".tif", and ".tmp".

Note
WINDOWS only
Use this function to be able to generate images with colors different from black and white.
See also
BCSaveImage(), BCSaveImageToBuffer(), BCPostscriptToFile(), BCPCLToMemory(), BCGetEnhMetaFile()
Parameters
[in]pBarCodePointer to barcode structure.
[in]hDCDevice context handle (default: NULL).
[in]lpszFileNameFilename.
[in]eImageTypeEnumeration for the type of the image.
[in]lQualityImage quality (meaning depends on image type; -1 for default).
[in]lXSizeX-Size of the image [pixel]. For vector formats (EPS, PCL, AI, SVG) the unit is [0.001 mms]
[in]lYSizeY-Size of the image [pixel]. For vector formats (EPS, PCL, AI, SVG) the unit is [0.001 mms]
[in]dXResX-Resolution of the image [pixels / inch].
[in]dYResY-Resolution of the image [pixels / inch}.
Return values
ERRCODEErrOk (0) in case of success. Non-zero if error occurred.

© 2022 All rights reserved by TEC-IT Datenverarbeitung GmbH
Generated on Wed May 18 2022 11:16:25 for TBarCode Library 11 with doxygen 1.8.17