Comments (5)
@EyreFree do "binarization" is to set the image just in black/white 2 colors, the CGImage.binarization() doesn't work since it use foreground/background color, is it right?
@Jacklchen I also found for some color (such as blue) in kCGColorSpaceDeviceGray only contains 2 components, so the init may also wrongly return nil.
from efqrcode.
I also found this. So fork the repository and fix it with return keyword for EFDefine.swift
@EyreFree
public struct EFUIntPixel {
public var red: UInt8 = 0
public var green: UInt8 = 0
public var blue: UInt8 = 0
public var alpha: UInt8 = 0
init(red: UInt8, green: UInt8, blue: UInt8, alpha: UInt8) {
self.red = red
self.green = green
self.blue = blue
self.alpha = alpha
}
init?(color: CGColor) {
if let components = color.components, 4 == color.numberOfComponents {
self.init(
red: UInt8(components[0] * 255.0),
green: UInt8(components[1] * 255.0),
blue: UInt8(components[2] * 255.0),
alpha: UInt8(components[3] * 255.0)
)
return
}
return nil
}
}
from efqrcode.
yeah. Hope that EyreFree
will fix it soon.
from efqrcode.
@vin-zhou @LegendChan please check to see if the master branch have fixed the problem.
from efqrcode.
We assume the bug is fixed. If it's still not working for you, leave a comment or discuss in the QQ group.
from efqrcode.
Related Issues (20)
- kCGImagePropertyGIFUnclampedDelayTime needs setting
- No such module 'EFQRCode' for watchOS target through SPM HOT 2
- In Xcode 12.2 using swift package with library 6.0.0, compiler issues warning HOT 2
- 目前没有扫一扫功能,后期会考虑添加扫一扫功能么
- SwiftUI API
- unable to give the colors of foreground and background HOT 2
- Ignoring 'isTimingPointStyled' param for "circle" pointStyle
- hey! hi,
- gif issue
- save button issue
- No such module 'EFQRCode' HOT 1
- can't run EFQRCode example code on Xcode
- How to pass json data to QRcode HOT 1
- 'EFQRCode-Swift.h' file not found 新建了一个OC新库 依赖于EFQRCode HOT 1
- Question about QRCodeRecognize HOT 1
- 生成二维码时,选择相册里的gif图作为水印图片,不能生成gif图片
- New versions missing in the appstore
- 如何设置圆角符号的二维码? HOT 1
- pod 没有6.2.2
- 怎么自定义 码眼
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from efqrcode.