We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b2ade7a commit d980902Copy full SHA for d980902
Demo-CustomQRCore/ViewController.m
@@ -88,11 +88,11 @@ - (UIImage*)imageBlackToTransparent:(UIImage*)image withRed:(CGFloat)red andGree
88
uint32_t* pCurPtr = rgbImageBuf;
89
for (int i = 0; i < pixelNum; i++, pCurPtr++){
90
if ((*pCurPtr & 0xFFFFFF00) < 0x99999900){
91
- // 改成下面的代码,会将图片转成想要的颜色
+ // change color
92
uint8_t* ptr = (uint8_t*)pCurPtr;
93
- ptr[3] = 60; //0~255
94
- ptr[2] = 74;
95
- ptr[1] = 89;
+ ptr[3] = red; //0~255
+ ptr[2] = green;
+ ptr[1] = blue;
96
}else{
97
98
ptr[0] = 0;
0 commit comments