Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

加一种二维码格式,就是中间嵌入清晰方格logo的二维码 #25

Closed
leo-yi opened this issue Jul 4, 2017 · 5 comments
Closed

Comments

@leo-yi
Copy link

leo-yi commented Jul 4, 2017

如题,希望作者有空能实现,谢谢~

@hick
Copy link

hick commented Aug 7, 2017

哈哈哈 我也比较各种花色蛮多, 这种没有实现是啥情况?

@ctrlxx
Copy link

ctrlxx commented Sep 12, 2019

可以通过pillow自行在中间添加

import os
from PIL import Image


if __name__ == '__main__':
    big_image = Image.open('./qr_code_logo/1.png')
    small_image = Image.open('logo.png')
    # small_image.show()
    small_image.thumbnail((100, 100))  # 可以实现压缩
    big_image.paste(small_image, (170, 170))
    # big_image.show()

@codingwesley
Copy link

可以通过pillow自行在中间添加

import os
from PIL import Image


if __name__ == '__main__':
    big_image = Image.open('./qr_code_logo/1.png')
    small_image = Image.open('logo.png')
    # small_image.show()
    small_image.thumbnail((100, 100))  # 可以实现压缩
    big_image.paste(small_image, (170, 170))
    # big_image.show()

你实现的,有效果图?

@ctrlxx
Copy link

ctrlxx commented Sep 16, 2019

图一是二维码的结构原理,图二是具体效果图
图1
图2

@ctrlxx
Copy link

ctrlxx commented Sep 16, 2019

可以通过pillow自行在中间添加

import os
from PIL import Image


if __name__ == '__main__':
    big_image = Image.open('./qr_code_logo/1.png')
    small_image = Image.open('logo.png')
    # small_image.show()
    small_image.thumbnail((100, 100))  # 可以实现压缩
    big_image.paste(small_image, (170, 170))
    # big_image.show()

你实现的,有效果图?

在上述评论

@x-hw x-hw closed this as completed Mar 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants