Barcode Xpress使用教程:如何为条码识别获取图像

原创|行业资讯|编辑:郝浩|2013-10-10 10:29:22.000|阅读 373 次

概述:在Barcode Xpress中可以使用ColorDepth方法或是在Barcode Xpress组件中的其他的方法可以转换其余的图像格式,如果你使用的是ImageGear的话,那么直接使用ConvertColorSpace方法就可以了。

# 界面/图表报表/文档/IDE等千款热门软控件火热销售中 >>

相关链接:

    条码控件Barcode Xpress可以处理1位黑白图像、8位灰度图像以及24位彩色图像。在Barcode Xpress中可以使用ColorDepth方法或是在Barcode Xpress组件中的其他的方法可以转换其余的图像格式,如果你使用的是ImageGear的话,那么直接使用ConvertColorSpace方法就可以了。

C++示例:使用Barcode Xpress导入图像

//load a 1BPP, black and white image into the ImagXpress control
      m_pImagXpress->FileName = “C:\\testbarcodeimage.tif”;
 
      // Copy the hDib
      long hDib = m_pImagXpress->CopyDIB();
 
      // Analyze the barcode
      m_pBarcodeXpress->AnalyzehDib(hDib);
 
      // Free the hDib
      GlobalFree(LongToHandle(hDib));

VB示例:使用Barcode Xpress导入图像

' Load the image
    ImagXpress1.FileName = "C:\testbarcodeimage.tif"
 
    ' Copy the hDib
    hDib = ImagXpress1.CopyDIB
 
    ' Analyze the barcode
    BarcodeXpress1.AnalyzehDib hDib
 
    ' Free the hDib
    GlobalFree hDib

C++示例:使用ImageGear导入图像

// Create an ImageGear page
      GearCORELib::IIGPagePtr page;
      page = g_pIGCore->CreatePage();

      // Load the page from file
      m_pIGFormats->LoadPageFromFile(page, fileName, 0);

      // Export the page to a dib
      GearCORELib::IIGPlatformDIBPtr platformDib = page->PlatformDIBExport(GearCORELib::IG_DIB_EXPORT_FORMAT_WINDOWS, false, 0, 0, page->ImageWidth, page->ImageHeight, 0);
      HGLOBAL hDib = LongToHandle(platformDib->DIBPtrGet());

      // Read the barcodes
      pBarcodeXpress->AnalyzehDib(HandleToLong(hDib));

VB示例:使用ImageGear导入图像

' Load the Page
    Dim page As New IGPage
    IGFormatsCtl1.LoadPageFromFile page, fileName, 0
 
    ' Export the platform dib from the page
    Dim platformDib As IGPlatformDIB
    Set platformDib = page.PlatformDIBExport(IG_DIB_EXPORT_FORMAT_WINDOWS, False, 0, 0, page.ImageWidth, page.ImageHeight, 0)
 
    ' Get the dib handle
    Dim hDib As Long
    hDib = platformDib.DIBPtrGet
 
    ' Read the barcodes on the image
    bcx8.AnalyzehDib hDib

>>>Barcode Xpress 下载


标签:

本站文章除注明转载外,均为本站原创或翻译。欢迎任何形式的转载,但请务必注明出处、不得修改原文相关链接,如果存在内容上的异议请邮件反馈至chenjj@evget.com

文章转载自:慧都控件网

为你推荐

  • 推荐视频
  • 推荐活动
  • 推荐产品
  • 推荐文章
  • 慧都慧问
扫码咨询


添加微信 立即咨询

电话咨询

客服热线
023-68661681

TOP