Open Permanently opened 2 years ago
Hi, as documented, you can use http headers X-QR-Min-Width
and X-QR-Min-Height
.
Let me know if that's what you're looking for.
Ah got it... Should be easy to implement.
Not perfect, but I think https://github.com/sayanarijit/qrcode.show/pull/14 is the best we can do within the library's capabilities.
But of course, there's always room for further improvements. Pls create a PR if you find something out.
Or maybe I'll can rethink a better way. So keeping the issue open.
Hi, as documented, you can use http headers
X-QR-Min-Width
andX-QR-Min-Height
. Let me know if that's what you're looking for.
I have type "curl qrcode.show -d @imp_details -H "X-QR-Max-Width:128, X-QR-Max-Height:128"" and it's not working.
I have type "curl qrcode.show -d @imp_details -H "X-QR-Max-Width:128, X-QR-Max-Height:128"" and it's not working.
@gdkali try -H "X-QR-Max-Width: 128" -H "X-QR-Max-Height: 128"
I have type "curl qrcode.show -d @imp_details -H "X-QR-Max-Width:128, X-QR-Max-Height:128"" and it's not working.
@gdkali try
-H "X-QR-Max-Width: 128" -H "X-QR-Max-Height: 128"
It worked, but the output is not what I need. The size is way too bigger. I tried to reduce the size(28*28) but no impact.
I have content on the text file are as follow Content name:- Type of file:- Link of Url:- Access type:-
@gdkali try smaller sizes -H "X-QR-Max-Width: 40" -H "X-QR-Max-Height: 40"
.
Default size for terminal is 20, for other image formats it's 360.
@gdkali try smaller sizes
-H "X-QR-Max-Width: 40" -H "X-QR-Max-Height: 40"
. Default size for terminal is 20, for other image formats it's 360.
I have noticed If you add multiple numbers of lines, the size of the QR code gets increase which is not normal behavior I believe for example
After adding 15 lines
Before adding 15 lines
@gdkali try smaller sizes
-H "X-QR-Max-Width: 40" -H "X-QR-Max-Height: 40"
. Default size for terminal is 20, for other image formats it's 360.I have noticed If you add multiple numbers of lines, the size of the QR code gets increase which is not normal behavior I believe for example
After adding 15 lines
Before adding 15 lines
QR code default size should not increase similar to web platform
@gdkali the qr code size increases only on the terminal to compensate for the increased number of blocks, because on terminals, the size of each block is fixed. You should get expected size when downloading other image formats using the Accept
header.
@gdkali the qr code size increases only on the terminal to compensate for the increased number of blocks, because on terminals, the size of each block is fixed. You should get expected size when downloading other image formats using the
Accept
header.
Uh, that's the reason qr code size gets bigger. I try to add multiple headers still size ratio is same
$ curl qrcode.show -d @imp_details -H "X-QR-Max-Width: 128" -H "X-QR-Max-Height :128" -H "Accept: image/png" --output abc.png
Describe the solution you'd like A resolution parameter to choose how big the QR code is (e.g. Google Chart's chs)
Additional context Just add some simple parameter such as
res=<width>x<height>
or something. I dunno ¯_(ツ)_/¯