Browse our Products

Aspose.BarCode for Cpp 26.1 Release Notes

All Changes

KeySummaryCategory
BARCODENET-39421Expose BarCodeReader.GetBarCodeDecodeType() as public methodEnhancement

Public API changes and New Features

BarCodeReadType property

A new BarCodeReadType property has been added to BarCodeReader, allowing you to get and set the barcode decode types used for recognition.

The SetBarCodeReadType(BaseDecodeType type) method has been deprecated in favor of this property.

    // Create reader with default constructor
    System::SharedPtr<BarCodeReader> reader = System::MakeObject<BarCodeReader>();

    // Set barcode types to recognize
    reader->set_BarCodeReadType(System::MakeObject<MultiDecodeType>(
        DecodeType::Code39,
        DecodeType::Code128));

    // Set the image to read
    reader->SetBarCodeImage(u"c:\\test.png");

    // Read and output results
    auto results = reader->ReadBarCodes();
    for (auto result : results)
    {
        std::wcout << u"BarCode Type: " << result->get_CodeTypeName() << std::endl;
        std::wcout << u"BarCode CodeText: " << result->get_CodeText() << std::endl;
    }

    // Output current read types
    std::wcout << u"BarCodeReadType: " << reader->get_BarCodeReadType()->ToString() << std::endl;