Code Monkey home page Code Monkey logo

Comments (2)

srowen avatar srowen commented on June 13, 2024

Sorry, can't help debug individual scans. Maybe you're looking at some base64-encoding of data rather than data

from zxing.

pratikukheshe avatar pratikukheshe commented on June 13, 2024

Thanks @srowen for your quick response.
Let me give some more background to you.
Currently, I am using zxing 3.5.3 APIs to read the data from African driving license barcode using below code.

try {
	BufferedImage image = ImageIO.read(file);
	LuminanceSource ls = new BufferedImageLuminanceSource(image);
	BinaryBitmap bmp = new BinaryBitmap(new HybridBinarizer(ls));
	GenericMultipleBarcodeReader reader = new GenericMultipleBarcodeReader(new MultiFormatReader());
	Map<DecodeHintType, Object> decodeHints = new EnumMap<>(DecodeHintType.class);
	decodeHints.put(DecodeHintType.TRY_HARDER, Boolean.TRUE);
	com.google.zxing.Result[] results1 = reader.decodeMultiple(bmp, decodeHints);
	for (com.google.zxing.Result result : results1) {
		System.out.println("Barcode " + ++i + ": " + result.getText());
		//here I am expecting 720 Bytes
		System.out.println("Barcode " + ++i + ": " + result.getText().getBytes());
	}
} catch (Exception e) {
	System.err.println("Error: " + e.getMessage());
}

Now as per this link - [(https://stackoverflow.com/questions/17549231/decode-south-african-za-drivers-license)]

this barcode contains the encrypted data which we need to decrypt and parse.

Using a commercial library, I am getting the data which are 720 Bytes and I have written the logic to decrypt and parse that data.
Now my expectation is that zxing should also return the 720 Bytes at mentioned point as comment in code, so that I can decrypt and parse it but here it is returning 1033 Bytes and I am not able to parse it.

So, Is that something wrong from my end in code or is it the limitation of zxing?

from zxing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.