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

Width is a bit weird #16

Open
jgriffiths014 opened this issue Nov 8, 2021 · 2 comments
Open

Width is a bit weird #16

jgriffiths014 opened this issue Nov 8, 2021 · 2 comments

Comments

@jgriffiths014
Copy link

jgriffiths014 commented Nov 8, 2021

the -width param acts very weird, its described as pixels unit, however if I set it to 450, I get an 18kx18k pixel image. If I specify 10, I get a 410x410 image, so I suspect there is some sort of mathematical shenanigans going on...

EDIT: thinking about it, it sounds like its acting like a multiplier rather than a static value...

@T0biii
Copy link
Contributor

T0biii commented Nov 10, 2021

mmmh
Also if you have more "data" in the QR-Code it gets also bigger.

New-QRCodeText -Width 10 -Text dfdsfdsfdsfdsfsdfsdfs2 -Show
image
New-QRCodeText -Width 10 -Text 1 -Show
image

i also think we cant realy do somthing because we depending on https://github.com/codebude/QRCoder where the GetGraphic(width) function is in

EDIT: The Paramter -width is therefore "pixelsPerModule" https://github.com/codebude/QRCoder/blob/942cd35cc42a96f36b2638a7dc3278b6ac88fbee/QRCoder/QRCode.cs#L18
EDIT2: see also: https://github.com/codebude/QRCoder/blob/942cd35cc42a96f36b2638a7dc3278b6ac88fbee/QRCoder/QRCode.cs#L30-L31

@hexathorpe
Copy link

EDIT: thinking about it, it sounds like its acting like a multiplier rather than a static value...

Too bad that it takes an integer, then. Maybe we could get desired dimensions if we could supply a value between 0 and 1. :) The cmdlets validate width values 10-2000...
Any chance this will be updated to work "as advertised" (100 px by default, custom px dimensions using the Width parameter)?

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

3 participants