QRCode image is messy


#1

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


#2

@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)


#3

JPEG always has compression artifacts, this is image standard issue

Use png or tiff to avoid this.


#4

Thank you for this information.

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

Thank you


#5

Please close this ticket

Thank you

Derek Williams


#6

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