Exemple #1
0
 public async Task <QrResult> Decode(string imageUrl)
 {
     return(await Task.Run(() =>
     {
         return new QrResult()
         {
             Text = ColorZXingRGB.Decode(new Uri(imageUrl))
         };
     }));
 }
Exemple #2
0
        private void TestRGB(string value, string fileName, ImageFormat format)
        {
            string filePath = TestUtils.GetFilePath(fileName);

            var bitmapWrite = ColorZXingRGB.Encode(value, 400, 400, 0);

            ColorZXing.Utils.WriteBitMap(bitmapWrite, filePath, format);

            var bitmapRead = ColorZXing.Utils.ReadBitMap(filePath);
            var txtDecoded = ColorZXingRGB.Decode(bitmapRead);

            Assert.AreEqual(value, txtDecoded);
        }