Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix #302: generate smaller QR Codes (Low input correction)
Browse files Browse the repository at this point in the history
  • Loading branch information
ottosuess committed Nov 13, 2019
1 parent 2f704a1 commit 16ced7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Library/Extensions/UIImage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ extension UIImage {
let stringData = string.data(using: .isoLatin1)
let filter = CIFilter(name: "CIQRCodeGenerator")
filter?.setValue(stringData, forKey: "inputMessage")
filter?.setValue("H", forKey: "inputCorrectionLevel")
filter?.setValue("L", forKey: "inputCorrectionLevel")

let scale = CGAffineTransform(scaleX: 10, y: 10)
if let image = filter?.outputImage?.transformed(by: scale) {
Expand Down

0 comments on commit 16ced7a

Please sign in to comment.