updated readme

This commit is contained in:
Haik Aslanyan committed 2020-05-09 13:30:36 +04:00
1 parent 25d734d87d
commit 2fa33d0e88
2 files changed
+6 -7

No files matched your search

+5 -5
View File
@@ -81,11 +81,11 @@ You can also decode a UIImage like this
```swift
let coder = RCCoder()
do {
messageLabel.text = try coder.decode(UIImage(named: code)!)
} catch {
//handle errors
}
do {
messageLabel.text = try coder.decode(UIImage(named: code)!)
} catch {
//handle errors
}
```
## Appearance
+1 -2
View File
@@ -74,9 +74,8 @@ extension RCImageDecoder {
return points
}
private func scanPixelPattern(for mode: ScanMode, data: PixelContainer) -> [PixelPattern] {
var lastPattern = PixelPattern.init(bit: pixelThreshold.contains((data[0, 0])) ? RCBit.one : RCBit.zero, x: 0, y: 0, count: 0)
var lastPattern = PixelPattern(bit: pixelThreshold.contains((data[0, 0])) ? RCBit.one : RCBit.zero, x: 0, y: 0, count: 0)
var pixelPatterns = [lastPattern]
var count = 0
let maxSize = size * size