Code Monkey home page Code Monkey logo

idcard_web's Introduction

idcardgenerator

【仅做研究使用,请遵守当地法律法规,法律后果自负】

身份证图片生成工具,填入信息,选择一张头像图片,即可生成黑白和彩色身份证图片。

可以选择是否自动抠图,自动抠图目前仅支持纯色背景,对自动抠图效果不满意可以手动抠图。

在线抠图地址:(https://burner.bonanza.com/)

(https://www.gaoding.com/koutu)

更新:

  • 1.自动改变头像大小
  • 2.自动从纯色背景中抠图
  • 3.需要安装opencv

ToDo

  • 自动从复杂背景下抠图

环境

  • numpy
  • pillow
  • opencv

下载

打包程序

安装pyinstaller

pip install pyinstaller

Mac打包(打包成Mac app尚有问题未解决)

pyinstaller -i usedres/ico.icns --windowed --clean --noconfirm --onefile --add-data ./usedres:./usedres idcardgenerator.py

Windows打包

pyinstaller -i usedres/ico.ico --windowed --clean --noconfirm --onefile --add-data "usedres;usedres" idcardgenerator.py

参照标准:

正面

  “姓名”、“性别”、“民族”、“出生年月日”、“住址”、“公民身份号码”为6号黑体字,用蓝色油墨印刷;登记项目中的姓名项用5号黑体字印刷;其他项目则用小5号黑体字印刷;出生年月日 方正黑体简体字符大小:姓名+号码(11点)其他(9点)字符间距(AV):号码(50)字符行距:住址(12点);身份证号码字体 OCR-B 10 BT 文字 华文细黑。

背面

  左上角为国徽,用红色油墨印刷;其右侧为证件名称“中华人民共和国居民身份证”,分上下两排排列,其中上排的“中华人民共和国”为4号宋体字,下排的“居民身份证”为2号宋体字;“签发机关”、“有效期限”为6号加粗黑体字;签发机关登记项采用,“xx市公安局”;有效期限采用“xxxx.xx-xxxx.xx.xx”格式,使用5号黑体字印刷,全部用黑色油墨印刷。

**第二代身份证有蒙古文、藏文、维吾尔文、朝鲜文、彝文、壮文六种民族文字与汉文字并列的双文版身份证。 使用以上六种民族文字的少数民族地区的共有资料部分一律为民族文在上(蒙文在左)、汉文在下双文版本。 本人资料部分少数民族地区的主体少数民族居民可以申请附加民族语言在汉文之上,汉族以及其他民族居民则只显示汉文。 即:**维吾尔自治区全区的身份证的共有资料部分一律为维汉双文版本(例:姓名nami), 而区内的维吾尔族居民可以在本人资料部分的汉文之上附加维吾尔文(例:纳斯尔丁·阿凡提nesirdinependi), 而区内的汉族或其他少数民族的本人资料部分则只有汉文,或也可申请附加维吾尔文, 但不能附加其他的民族文字(如哈萨克文、蒙古文、锡伯文等)。共有资料部分有以下九项,正面七项以天蓝字显示,背面二项以黑字显示。

使用指南

使用前准备

使用前需要准备粘贴背景以及头像,分别放在resource目录下的icon(头像)和background(背景)
执行命令:
bin/img_gen.sh 
各参数意义命令帮助里面都有

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.