Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture BarcodeImages/ BarcodeImage of BarcodeResult returns incorrect image #1

Open
dhongki opened this issue May 24, 2019 · 0 comments

Comments

@dhongki
Copy link

dhongki commented May 24, 2019

Hello Please delete if this is not really an issue.

Trying to get the Barcode Image of the barcoderesult but I am getting incorrect image.
The bounds properties also returns 0. But the reading is correct.
ironbarcode result

this is my code. Please correct if i am wrong. thank you

string resultValue = string.Empty;
BarcodeEncoding barcodeEncoding = BarcodeEncoding.All;
BarcodeReader.CaptureBarcodeImages = true;
BarcodeResult[] barcodeResults = BarcodeReader.ReadAllBarcodes(RawImage1.Clone().Bitmap, barcodeEncoding, BarcodeReader.BarcodeRotationCorrection.Low, BarcodeReader.BarcodeImageCorrection.LighlyCleanPixels);

foreach(BarcodeResult barcoderesult in barcodeResults)
{
      resultValue = string.Format("{0}{1}",resultValue,barcoderesult.Text);
     GraphicsUnit graphicsUnit = GraphicsUnit.Pixel;
     barcoderesult.BarcodeImage.Save("test1.png");
     Console.WriteLine(barcoderesult.BarcodeImage.GetBounds(ref graphicsUnit).Top.ToString());
}
@dhongki dhongki changed the title CaptureBarcodeImages/ BarcodeImage of BarcodeResult Capture BarcodeImages/ BarcodeImage of BarcodeResult returns incorrect image May 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant