imageapi.cpp File Reference

Public API functions to create barcodes as bitmap images (Windows only). More...


Functions

ERRCODE 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). With vector-EPS files you can choose between using Windows fonts (nQuality = 0) and using Postscript compatible fonts (nQuality = 1). 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() \param[in] pBarCode Pointer to barcode structure. \param[in] hDC Device context handle (default: NULL). \param[in] lpszFileName Filename. \param[in] eImageType Enumeration for the type of the image. \param[in] lQuality Image Quality (Meaning depends on image type; -1 for default). \param[in] lXSize X-Size of the image [pixel]. For vector formats (EPS, PCL, AI, SVG) the unit is [0.001 mms] \param[in] lYSize Y-Size of the image [pixel]. For vector formats (EPS, PCL, AI, SVG) the unit is [0.001 mms] \param[in] dXRes X-Resolution of the image [pixels / inch]. \param[in] dYRes Y-Resolution of the image [pixels / inch}.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.


ERRCODE BCSaveImageExW (t_BarCode* pBarCode, HDC hDC, LPCWSTR 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). With vector-EPS files you can choose between using Windows fonts (nQuality = 0) and using Postscript compatible fonts (nQuality = 1). 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() \param[in] pBarCode Pointer to barcode structure. \param[in] hDC Device context handle (default: NULL). \param[in] lpszFileName Filename. \param[in] eImageType Enumeration for the type of the image. \param[in] lQuality Image Quality (Meaning depends on image type; -1 for default). \param[in] lXSize X-Size of the image [pixel]. For vector formats (EPS, PCL, AI, SVG) the unit is [0.001 mms] \param[in] lYSize Y-Size of the image [pixel]. For vector formats (EPS, PCL, AI, SVG) the unit is [0.001 mms] \param[in] dXRes X-Resolution of the image [pixels / inch]. \param[in] dYRes Y-Resolution of the image [pixels / inch}.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.


ERRCODE BCSaveImageA (t_BarCode* pBarCode, LPCSTR lpszFileName, e_IMType eImageType, LONG lXSize, LONG lYSize, DOUBLE dXRes, DOUBLE dYRes)
 Saves the barcode to an image-file (Windows only). Saves the barcode to an image-file (format Bmp, Jpg, Png, Eps, Emf...). The values of lXSize and lYSize should be increased, if the barcode is not readable. The values of dXRes and dYRes can affect printing size when printing from graphic- or painting programs. 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
To be able to generate images with colors different from black and white use the function BCSaveImageEx instead.
See also:
BCSaveImageEx(), BCSaveImageToBuffer(), BCPostscriptToFile(), BCPCLToMemory(), BCGetEnhMetaFile() \param[in] pBarCode Pointer to barcode structure. \param[in] lpszFileName Filename \param[in] eImageType Enumeration for the type of the image. \param[in] lXSize X-Size of the image [pixel]. For vector formats the unit is [0.001 mms] \param[in] lYSize Y-Size of the image [pixel]. For vector formats the unit is [0.001 mms] \param[in] dXRes X-Resolution of the image [pixels / inch]. \param[in] dYRes Y-Resolution of the image [pixels / inch].
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.


ERRCODE BCSaveImageW (t_BarCode* pBarCode, LPCWSTR lpszFileName, e_IMType eImageType, LONG lXSize, LONG lYSize, DOUBLE dXRes, DOUBLE dYRes)
 Saves the barcode to an image-file (Windows only). Saves the barcode to an image-file (format Bmp, Jpg, Png, Eps, Emf...). The values of lXSize and lYSize should be increased, if the barcode is not readable. The values of dXRes and dYRes can affect printing size when printing from graphic- or painting programs. 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
To be able to generate images with colors different from black and white use the function BCSaveImageEx instead.
See also:
BCSaveImageEx(), BCSaveImageToBuffer(), BCPostscriptToFile(), BCPCLToMemory(), BCGetEnhMetaFile() \param[in] pBarCode Pointer to barcode structure. \param[in] lpszFileName Filename \param[in] eImageType Enumeration for the type of the image. \param[in] lXSize X-Size of the image [pixel]. For vector formats the unit is [0.001 mms] \param[in] lYSize Y-Size of the image [pixel]. For vector formats the unit is [0.001 mms] \param[in] dXRes X-Resolution of the image [pixels / inch]. \param[in] dYRes Y-Resolution of the image [pixels / inch].
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.


ERRCODE BCSaveImageToBufferEx (t_BarCode* pBarCode, HDC hDC, LPBYTE* lpBuffer, e_IMType eImageType, LONG lQuality, LONG lXSize, LONG lYSize, DOUBLE dXRes, DOUBLE dYRes)
 Saves barcode as image into a memory buffer (extended version, Windows only). Like BCSaveImageToBuffer() with the additional possibility to specify the image quality. For a description refer to BCSaveImageEx().
Note:
WINDOWS only. This function can be used with a developer license only.
See also:
BCSaveImageToBuffer() \param[in] pBarCode Pointer to barcode structure. \param[in] hDC Device context (default: NULL). \param[out] lpBuffer Buffer. \param[in] eImageType Enumeration for the type of the image. \param[in] lQuality Image Quality (meaning depends on image type). \param[in] lXSize X-Size of the image [pixel]. For vector formats the unit is [0.001 mms] \param[in] lYSize Y-Size of the image [pixel]. For vector formats the unit is [0.001 mms] \param[in] dXRes X-Resolution of the image [pixels / inch]. \param[in] dYRes Y-Resolution of the image [pixels / inch].
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.


ERRCODE BCSaveImageToBuffer (t_BarCode* pBarCode, LPBYTE* lpBuffer, e_IMType eImageType, LONG lXSize, LONG lYSize, DOUBLE dXRes, DOUBLE dYRes)
 The values of XSize and YSize should be increased, if the barcode is not readable or requires a high printing resolution. The values of XRes and YRes can affect the printing size when printing from graphic- or painting programs (but not when printing from the browser!). The buffer will be allocated on the global heap. Retrieve the buffer size in Bytes with GlobalSize((HGLOBAL)GlobalHandle(szBuffer)). It is recommended to lock the buffer before reading with pMem = GlobalLock (hMem) and unlock it afterwards (GlobalUnlock(hMem)). When no longer needed the buffer must be released by calling GlobalFreePtr(buffer) (WINDOWSX.h macro).
Note:
WINDOWS only. This function can be used with a developer license only.
See also:
BCSaveImageToBufferEx() \param[in] pBarCode Pointer to barcode structure. \param[out] lpBuffer Buffer. \param[in] eImageType Enumeration for the type of the image. \param[in] lXSize X-Size of the image [pixel]. For vector formats the unit is [0.001 mms] \param[in] lYSize Y-Size of the image [pixel]. For vector formats the unit is [0.001 mms] \param[in] dXRes X-Resolution of the image [pixels / inch]. \param[in] dYRes Y-Resolution of the image [pixels / inch].
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.



Detailed Description

Public API functions to create barcodes as bitmap images (Windows only).

Required include file: "tbarcode.h"

Author(s):
TEC-IT Datenverarbeitung GmbH
Wagnerstr. 6, 4400 Steyr, AUSTRIA/EUROPE
https://www.tec-it.com
Copyright© by TEC-IT Datenverarbeitung GmbH


Function Documentation

ERRCODE BCSaveImageA ( t_BarCode * pBarCode,
LPCSTR lpszFileName,
e_IMType eImageType,
LONG lXSize,
LONG lYSize,
DOUBLE dXRes,
DOUBLE dYRes )

Saves the barcode to an image-file (Windows only). Saves the barcode to an image-file (format Bmp, Jpg, Png, Eps, Emf...). The values of lXSize and lYSize should be increased, if the barcode is not readable. The values of dXRes and dYRes can affect printing size when printing from graphic- or painting programs. 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
To be able to generate images with colors different from black and white use the function BCSaveImageEx instead.
See also:
BCSaveImageEx(), BCSaveImageToBuffer(), BCPostscriptToFile(), BCPCLToMemory(), BCGetEnhMetaFile() \param[in] pBarCode Pointer to barcode structure. \param[in] lpszFileName Filename \param[in] eImageType Enumeration for the type of the image. \param[in] lXSize X-Size of the image [pixel]. For vector formats the unit is [0.001 mms] \param[in] lYSize Y-Size of the image [pixel]. For vector formats the unit is [0.001 mms] \param[in] dXRes X-Resolution of the image [pixels / inch]. \param[in] dYRes Y-Resolution of the image [pixels / inch].
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.

ERRCODE 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). With vector-EPS files you can choose between using Windows fonts (nQuality = 0) and using Postscript compatible fonts (nQuality = 1). 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() \param[in] pBarCode Pointer to barcode structure. \param[in] hDC Device context handle (default: NULL). \param[in] lpszFileName Filename. \param[in] eImageType Enumeration for the type of the image. \param[in] lQuality Image Quality (Meaning depends on image type; -1 for default). \param[in] lXSize X-Size of the image [pixel]. For vector formats (EPS, PCL, AI, SVG) the unit is [0.001 mms] \param[in] lYSize Y-Size of the image [pixel]. For vector formats (EPS, PCL, AI, SVG) the unit is [0.001 mms] \param[in] dXRes X-Resolution of the image [pixels / inch]. \param[in] dYRes Y-Resolution of the image [pixels / inch}.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.

ERRCODE BCSaveImageExW ( t_BarCode * pBarCode,
HDC hDC,
LPCWSTR 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). With vector-EPS files you can choose between using Windows fonts (nQuality = 0) and using Postscript compatible fonts (nQuality = 1). 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() \param[in] pBarCode Pointer to barcode structure. \param[in] hDC Device context handle (default: NULL). \param[in] lpszFileName Filename. \param[in] eImageType Enumeration for the type of the image. \param[in] lQuality Image Quality (Meaning depends on image type; -1 for default). \param[in] lXSize X-Size of the image [pixel]. For vector formats (EPS, PCL, AI, SVG) the unit is [0.001 mms] \param[in] lYSize Y-Size of the image [pixel]. For vector formats (EPS, PCL, AI, SVG) the unit is [0.001 mms] \param[in] dXRes X-Resolution of the image [pixels / inch]. \param[in] dYRes Y-Resolution of the image [pixels / inch}.
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.

ERRCODE BCSaveImageToBuffer ( t_BarCode * pBarCode,
LPBYTE * lpBuffer,
e_IMType eImageType,
LONG lXSize,
LONG lYSize,
DOUBLE dXRes,
DOUBLE dYRes )

The values of XSize and YSize should be increased, if the barcode is not readable or requires a high printing resolution. The values of XRes and YRes can affect the printing size when printing from graphic- or painting programs (but not when printing from the browser!). The buffer will be allocated on the global heap. Retrieve the buffer size in Bytes with GlobalSize((HGLOBAL)GlobalHandle(szBuffer)). It is recommended to lock the buffer before reading with pMem = GlobalLock (hMem) and unlock it afterwards (GlobalUnlock(hMem)). When no longer needed the buffer must be released by calling GlobalFreePtr(buffer) (WINDOWSX.h macro).

Note:
WINDOWS only. This function can be used with a developer license only.
See also:
BCSaveImageToBufferEx() \param[in] pBarCode Pointer to barcode structure. \param[out] lpBuffer Buffer. \param[in] eImageType Enumeration for the type of the image. \param[in] lXSize X-Size of the image [pixel]. For vector formats the unit is [0.001 mms] \param[in] lYSize Y-Size of the image [pixel]. For vector formats the unit is [0.001 mms] \param[in] dXRes X-Resolution of the image [pixels / inch]. \param[in] dYRes Y-Resolution of the image [pixels / inch].
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.

ERRCODE BCSaveImageToBufferEx ( t_BarCode * pBarCode,
HDC hDC,
LPBYTE * lpBuffer,
e_IMType eImageType,
LONG lQuality,
LONG lXSize,
LONG lYSize,
DOUBLE dXRes,
DOUBLE dYRes )

Saves barcode as image into a memory buffer (extended version, Windows only). Like BCSaveImageToBuffer() with the additional possibility to specify the image quality. For a description refer to BCSaveImageEx().

Note:
WINDOWS only. This function can be used with a developer license only.
See also:
BCSaveImageToBuffer() \param[in] pBarCode Pointer to barcode structure. \param[in] hDC Device context (default: NULL). \param[out] lpBuffer Buffer. \param[in] eImageType Enumeration for the type of the image. \param[in] lQuality Image Quality (meaning depends on image type). \param[in] lXSize X-Size of the image [pixel]. For vector formats the unit is [0.001 mms] \param[in] lYSize Y-Size of the image [pixel]. For vector formats the unit is [0.001 mms] \param[in] dXRes X-Resolution of the image [pixels / inch]. \param[in] dYRes Y-Resolution of the image [pixels / inch].
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.

ERRCODE BCSaveImageW ( t_BarCode * pBarCode,
LPCWSTR lpszFileName,
e_IMType eImageType,
LONG lXSize,
LONG lYSize,
DOUBLE dXRes,
DOUBLE dYRes )

Saves the barcode to an image-file (Windows only). Saves the barcode to an image-file (format Bmp, Jpg, Png, Eps, Emf...). The values of lXSize and lYSize should be increased, if the barcode is not readable. The values of dXRes and dYRes can affect printing size when printing from graphic- or painting programs. 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
To be able to generate images with colors different from black and white use the function BCSaveImageEx instead.
See also:
BCSaveImageEx(), BCSaveImageToBuffer(), BCPostscriptToFile(), BCPCLToMemory(), BCGetEnhMetaFile() \param[in] pBarCode Pointer to barcode structure. \param[in] lpszFileName Filename \param[in] eImageType Enumeration for the type of the image. \param[in] lXSize X-Size of the image [pixel]. For vector formats the unit is [0.001 mms] \param[in] lYSize Y-Size of the image [pixel]. For vector formats the unit is [0.001 mms] \param[in] dXRes X-Resolution of the image [pixels / inch]. \param[in] dYRes Y-Resolution of the image [pixels / inch].
Return values:
ERRCODE   ErrOk (0) in case of success. Non-zero if error occurred. ----------------------------------------------------------------------------.


© 2019 All rights reserved by TEC-IT Datenverarbeitung GmbH
Generated on Sat Jul 13 03:16:06 2019 for TBarCode Library 11 with doxygen 1.1.5