आज के डिजिटल परिदृश्य में, प्रभावी और विश्वसनीय डेटा भंडारण समाधान महत्वपूर्ण हैं. Aztec कोड एक उच्च क्षमता बारकोड प्रारूप प्रदान करते हैं जो मजबूत त्रुटियों को ठीक करने की क्षमता के साथ अल्फान्यूमेरिक जानकारी की बड़ी मात्रा को संग्रहीत कर सकता है. यह गाइड आपको दिखाएगा कि कैसे पैदा करें और .NET के लिए Aspose.BarCode का उपयोग करके एज़टेक कोडे पढ़ें.

Aztec कोड बनाना

.NET के लिए Aspose.BarCode द्वारा प्रदान की जाने वाली शक्तिशाली सुविधाओं के कारण C# में एक Aztec कोड उत्पन्न करना सरल है. नीचे एक बुनियादी एज़टेक कोडी बनाने के कदम दिए गए हैं:

कदम-दर-चरण गाइड

सबसे पहले, सुनिश्चित करें कि आपने NuGet या आपके पसंदीदा स्रोत से आवश्यक पैकेज स्थापित किया है।

using Aspose.BarCode;

public void GenerateAztecCode()
{
    // Create an instance of BarCodeGenerator for Aztec symbology
    BarCodeGenerator generator = new BarCodeGenerator(EncodeTypes.Aztec);
    
    // Set the data to encode in the barcode
    generator.CodeText = "SampleData1234567890";
    
    // Save the generated Aztec code as an image file
    generator.Save("aztec_code.png", BarCodeImageFormat.Png);
}

कोड का अनुकूलन

आप बारकोड के विभिन्न पहलुओं को अनुकूलित कर सकते हैं, जैसे कि आकार, रंग और त्रुटि सुधार स्तर।

// Set the width and height of the barcode image
int width = 200;
int height = 200;
generator.GraphicsUnit = System.Drawing.GraphicsUnit.Pixel;
generator.SymbologySettings.Aztec.CodeSize = new Size(width, height);

generator.Save("custom_aztec_code.png", BarCodeImageFormat.Png);

Aztec कोड पढ़ें

.NET के लिए Aspose.BarCode के साथ एक Aztec कोड को डेटा में वापस पढ़ना उतना ही सरल है. निम्नलिखित उदाहरण दिखाता है कि एक उत्पन्न अज़टेक बारकोड छवि को कैसे पढ़ा जाए और एन्क्रिप्ट किए गए पाठ को निकाल दिया जाए.

कदम-दर-चरण गाइड

एक एज़टेक कोड पढ़ने के लिए, प्रारंभ करें BarCodeReader ऑब्जेक्ट और फ़ाइल मार्ग को उस पट्टी कोड छवि के लिए निर्दिष्ट करें जिसे आप डिकोड करना चाहते हैं।

using Aspose.BarCode.BarCodeRecognition;

public void ReadAztecCode()
{
    // Initialize a BarCodeReader instance for reading Aztec codes
    BarCodeReader reader = new BarCodeReader("aztec_code.png", DecodeType.Aztec);
    
    // Iterate through all detected barcodes in the image
    foreach (BarCodeResult result in reader.ReadBarCodes())
    {
        Console.WriteLine($"Decoded text: {result.CodeText}");
        Console.WriteLine($"Barcode type: {result.CodeType}");
        Console.WriteLine($"Confidence: {result.ReadingQuality}%");
    }
}

पढ़ने में सुधार

बेहतर पढ़ने की क्षमता के लिए, आप सेटअप कर सकते हैं BarCodeReader चुनौतीपूर्ण परिस्थितियों में पहचान सटीकता में सुधार करने के लिए गुणवत्ता सेटिंग्स लागू करें।

reader.QualitySettings.AllowMedianSmoothing = true;
reader.QualitySettings.MedianSmoothingWindowSize = 5;

Conclusion

.NET के लिए Aspose.BarCode का उपयोग करके, डेवलपर्स आसानी से अपने अनुप्रयोगों में Aztec कोड जनरेटिंग और पढ़ने की सुविधाओं को एकीकृत कर सकते हैं, ताकि प्रभावी और विश्वसनीय डेटा प्रबंधन सुनिश्चित किया जा सके।

More in this category