原創|使用教程|編輯:郝浩|2013-05-17 13:38:19.000|閱讀 450 次
概述:為了得到一個精確的圖片,你可以根據所需條形碼的水平和垂直尺寸調整圖像的像素大小。通過使用屬性2DXCols(模塊的列數)和2DXRows(模塊的行數),就可以對圖像的尺寸進行優化。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
為了得到一個精確的圖片,你可以根據所需條形碼的水平和垂直尺寸調整圖像的像素大小。通過使用屬性2DXCols(模塊的列數)和2DXRows(模塊的行數),就可以對圖像的尺寸進行優化:
Dim nScale As Long Dim nXSize As Long Dim nYSize As Long ' 1) Initialize the barcode TBarCode111.Text = "Somedata" TBarCode111.BarCode = TBarCode11Lib.eBC_MicroPDF417 ' 2) Use 5 pixels per module nScale = 5 nXSize = TBarCode111.Get2DXCols * nScale nYSize = TBarCode111.Get2DXRows * nScale ' 3) Save the barcode using the optimized size ' (Please note: The resolution specified by the last two parameters is only stored as ' information in the image attributes (if supported by the image type). ' It has no influence on the pixel size of the generated image.) TBarCode111.SaveImage "C:/MyBarcode.bmp", TBarCode11Lib.eIMBmp, nXSize, nYSize, 72, 72
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉載自:慧都控件網