{"id":15107710,"url":"https://github.com/rvillemeur/qrcode","last_synced_at":"2025-10-23T02:31:33.805Z","repository":{"id":172057081,"uuid":"255443372","full_name":"rvillemeur/QRCode","owner":"rvillemeur","description":"A QRCode generator for Pharo","archived":false,"fork":false,"pushed_at":"2023-10-28T18:47:35.000Z","size":65,"stargazers_count":8,"open_issues_count":0,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-30T17:11:24.606Z","etag":null,"topics":["pharo","pharo-smalltalk","qrcode","qrcode-generator"],"latest_commit_sha":null,"homepage":null,"language":"Smalltalk","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rvillemeur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-04-13T21:16:09.000Z","updated_at":"2024-09-06T19:23:41.000Z","dependencies_parsed_at":"2023-07-03T16:31:36.494Z","dependency_job_id":null,"html_url":"https://github.com/rvillemeur/QRCode","commit_stats":null,"previous_names":["rvillemeur/qrcode"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvillemeur%2FQRCode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvillemeur%2FQRCode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvillemeur%2FQRCode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvillemeur%2FQRCode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rvillemeur","download_url":"https://codeload.github.com/rvillemeur/QRCode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237769067,"owners_count":19363250,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pharo","pharo-smalltalk","qrcode","qrcode-generator"],"created_at":"2024-09-25T21:41:10.318Z","updated_at":"2025-10-23T02:31:28.497Z","avatar_url":"https://github.com/rvillemeur.png","language":"Smalltalk","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QRCode\nA QRCode generator for Pharo. QR Code generation based on the latest specifications: ISO/IEC 18004:2006(E). It includes generation of MicroQR codes, though these are not recommended for general use because few readers are available. The generation code is meant as a service for other applications; however, a small Zinc web application is included to generate QR code images.\n\n'http://pharo.org' asQRCode form magnifyBy: 10\n\n# history\nInitial code was created by Jochen Rick and hosted on smalltalkhub.\nhttp://smalltalkhub.com/#!/~JochenRick/QRCode/\n\n# loading\n```smalltalk\nMetacello new\n\tbaseline: 'QRCode';\n\trepository: 'github://rvillemeur/QRCode/src';\n\tload\n```\n\n# usage\ninitial quote on using: https://pharoweekly.wordpress.com/2018/04/13/qrcode-a-thank-you-note/\n\n```smalltalk\nT123Ticket\u003e\u003e#asQRCode\n\n^ self url asString asQRCode formWithQuietZone magnifyBy: 5\n```\n\nIt is also easy  to combine the QR code with some text:\n\n```smalltalk\nT123Ticket \u003e\u003e#asQRCodeWithText\n\n| form font |\nform := Form extent: 535 @ 185 depth: 1.\nfont := LogicalFont familyName: ‘Bitmap DejaVu Sans’ pointSize: 14.\nself asQRCode displayOn: form at: 0 @ 0.\nform getCanvas\ndrawString: self url asString at: 180 @ 20 font: font color: Color black;\ndrawString: self id36, ‘ – ‘, ticketId asString at: 180 @ 45 font: font color: Color black;\ndrawString: (name ifNil: [ ‘N.N’ ]) at: 180 @ 90  font: font color: Color black;\ndrawString: (email ifNil: [ ‘@’ ]) at: 180 @ 115 font: font color: Color black;\ndrawString: (phone ifNil: [ ‘+’ ]) at: 180 @ 140 font: font color: Color black.\n^ form\n```\n\nNext we combine this with a nice template designed by a graphics artist:\n```smalltalk\nT123Ticket \u003e\u003e#asQRCodeWithTextInTemplate\n| templateFile form |\ntemplateFile := ‘tickets123-template-{1}.jpg’ format: { self event id }.\nform := PluginBasedJPEGReadWriter formFromFileNamed: templateFile.\nself asQRCodeWithText displayOn: form at: 20@540.\n^ form\n\n```\n\nAnd finally, the ticket form is encoded as a JPEG:\n\n```smalltalk\nT123Ticket \u003e\u003e#asJPEGBytes\n^ ByteArray streamContents: [ :out |\nPluginBasedJPEGReadWriter putForm: self asQRCodeWithTextInTemplate onStream: out ]\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvillemeur%2Fqrcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frvillemeur%2Fqrcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvillemeur%2Fqrcode/lists"}