Commit 200cea5e LN

参数修改

1 个父辈 5c989fcf
......@@ -154,11 +154,11 @@ namespace CodeLibrary
stopwatch.Restart();
HDCodeHelper.HalconWindow = this.hWindowControl1.HalconWindow;
Bitmap map = new Bitmap(pictureBox1.Image);
if (chbZxing.Checked)
{
zxingDecode(map, "barcode");
}
else
//if (chbZxing.Checked)
//{
// zxingDecode(map, "barcode");
//}
//else
{
List<CodeInfo> result = HDCodeHelper.DecodeBarCode(map);
ShowCode(result);
......@@ -206,11 +206,11 @@ namespace CodeLibrary
{
codeParamPath = "";
}
if (chbZxing.Checked)
{
zxingDecode(map, cmbCodeType.Text);
}
else
//if (chbZxing.Checked)
//{
// zxingDecode(map, cmbCodeType.Text);
//}
//else
{
List<CodeInfo> codeList = new List<CodeInfo>();
if (cmbCodeType.Text.ToLower().Equals("barcode"))
......@@ -235,14 +235,14 @@ namespace CodeLibrary
}
private void zxingDecode(Bitmap map,string type )
{
List<string> results = ZXingCodeHelper.DeCodes(map, type);
//List<string> results = ZXingCodeHelper.DeCodes(map, type);
txtResult.Text = " zxing decode:";
foreach (string code in results)
{
txtResult.Text += "\r\n" + "\r\n" + code;
}
txtResult.Text += "\r\n \r\n elapsed time:" + stopwatch.Elapsed.ToString();
//txtResult.Text = " zxing decode:";
//foreach (string code in results)
//{
// txtResult.Text += "\r\n" + "\r\n" + code;
//}
//txtResult.Text += "\r\n \r\n elapsed time:" + stopwatch.Elapsed.ToString();
}
private void btnClearLog_Click(object sender, EventArgs e)
......
......@@ -200,7 +200,7 @@ namespace CodeLibrary
ho_Image.Dispose();
Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height);
BitmapData srcBmpData = bmp.LockBits(rect, ImageLockMode.ReadOnly, PixelFormat.Format32bppRgb);
BitmapData srcBmpData = bmp.LockBits(rect, ImageLockMode.ReadOnly, bmp.PixelFormat);
HOperatorSet.GenImageInterleaved(out ho_Image, srcBmpData.Scan0, "bgrx", bmp.Width, bmp.Height, 0, "byte", 0, 0, 0, 0, -1, 0);
bmp.UnlockBits(srcBmpData);
......
......@@ -145,7 +145,7 @@ namespace CodeLibrary
int rtn = cameraCurr[index].MV_CC_StartGrabbing_NET();
if (rtn != MyCamera.MV_OK)
{
_errInfo = "Can not grab one";
_errInfo = "Can not grab one : "+ rtn;
return null;
}
return ImageCapture(index);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!