QRCode image is messy

barcode.jpg (3.3 KB)

This jpeg has space all around the qr code. When I open the image in adobe acrobat I see unwanted dots around the qr code.

I need just the qr code with no extra bits.

Thank you

Derek Williams

@Derek_Berek,
I have tried to read and write back again this QR code using following sample code but could not observe issue by comparing the input and output images. Could you please explain the issue in detail along with images? We will look into it and provide our feedback.

BarCodeReader reader = new BarCodeReader("barcode.jpg", DecodeType.QR);
while (reader.Read())
{
    // Read symbology type and code text
    Console.WriteLine("Symbology Type: " + reader.GetCodeType());
    using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.QR))
    {
        generator.CodeText = reader.GetCodeText();
        generator.Parameters.Barcode.CodeTextParameters.Location = CodeLocation.None;
        generator.Save("output.jpg");
    }
}
reader.Close();

output.jpg (3.6 KB)

JPEG always has compression artifacts, this is image standard issue
https://en.wikipedia.org/wiki/Compression_artifact

Use png or tiff to avoid this.

Thank you for this information.

I’m using .png files now and it the result is much better.

Thank you

Please close this ticket

Thank you

Derek Williams

@Derek_Berek,
Thank you for the feedback and feel free to write us back if you have any other query related to Aspose.BarCode.