public void DecodeImageEqualsBitmap(string encoded) { var bmp = SKBlurHash.DeserializeBitmap(encoded, 20, 10); var img = SKBlurHash.DeserializeImage(encoded, 20, 10); Assert.Equal( bmp.PeekPixels().GetPixelSpan().ToArray(), img.PeekPixels().GetPixelSpan().ToArray()); }
public void NullDecodeThrows() { Assert.Throws <ArgumentNullException>(() => SKBlurHash.DeserializeImage(null, 20, 10)); }
public void DecodeImage(string encoded) { var img = SKBlurHash.DeserializeImage(encoded, 20, 10); Assert.NotNull(img); }