Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Can't read blur images

Open
#463 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
15/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
csharp

Research direction

The reporter's code is in the issue body: a BarcodeReader with AutoRotate, TryHarder and TryInverted set, decoding a Bitmap built by ConvertBase64ToImage from Image.FromStream. The failing image is only linked externally, not in the repository, so first obtain it and reproduce the null result. Done means the sample decodes, or the maintainers explain which preprocessing it needs. The thread has been quiet for about 983 days with no assignee or pull request, so confirm with a maintainer before starting.

Written by the indexing model from the issue text.

Description

Hi @micjahn,
Unable to read the blurry type images using zxing.net dll and below is my code and blur image base64 data:

image

string scannedData = "Here I have base64 of the image";

Image image = ConvertBase64ToImage(scannedData);
Bitmap bitmap = (Bitmap)image;

BarcodeReader barcodeReader = new BarcodeReader{ AutoRotate = true };
barcodeReader.Options.TryHarder = true;
barcodeReader.Options.TryInverted = true;
Result barcodeResult = barcodeReader.Decode(bitmap);
if (barcodeResult != null)
{
Console.WriteLine("BarCode Result - BarCode Text is: " + barcodeResult.Text + " ; BarCode Format is: " + barcodeResult.BarcodeFormat.ToString());
}
else
{
Console.WriteLine("BarCode Result is null");
}

private static Image ConvertBase64ToImage(string base64string)
{
try
{
byte[] imageBytes = Convert.FromBase64String(base64string);
MemoryStream ms = new MemoryStream(imageBytes, 0, imageBytes.Length);
//Convert byte[] to Image
ms.Write(imageBytes, 0, imageBytes.Length);
Image image = Image.FromStream(ms, true);
ms.Dispose();
return image;
}
catch (OutOfMemoryException ex)
{
Console.WriteLine($"Memory Out of Exception occured while converting base64 to Image and Message is : {ex.Message} & stack trace: {ex.StackTrace}");
return null;
}
catch (Exception ex)
{
Console.WriteLine($"Exception occured while converting base64 to Image and Message is : {ex.Message} & stack trace: {ex.StackTrace}");
return null;
}
}

Colud you help me on this how to Decode this type of images.

Thanks,
Rajesh

Dominant language
C#
Stars
3.1k
Forks
704
Avg merge
13d 17h
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from micjahn/ZXing.Net

All issues in micjahn/ZXing.Net

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.