Show HN: qrframe – generate beautiful qr codes with javascript code

238 pointsposted 13 hours ago
by zhengkyl

35 Comments

thih9

7 minutes ago

Looks great, very inspiring.

Some of these, like examples/blocks.svg[1], are not immediately recognized as qr codes by humans. This could lead to interesting possibilities; e.g. art with qr code/codes seamlessly integrated into it - and perhaps noticed only after someone tries to take a picture.

[1]: https://github.com/zhengkyl/qrframe/blob/b7705844b71764bcea8...

bscphil

8 hours ago

This looks super cool but I could only get 10/21 to scan with the classic zxing scanner (>100M downloads), and 3 of those took a bunch of playing with camera angles and distance, so I'd recommend against using anything too fancy for real world barcodes.

zhengkyl

4 hours ago

Thanks for trying it out! I definitely agree, the fancier it gets the harder it is to scan so these should not be used for real world stuff where reliability is important.

I basically only tested these on my own phone, a pixel 7 with default camera app, so I'm not surprised people with different hardware/software are getting varied results. I think I might try to automate testing using different scanners if I can figure that out.

keepamovin

5 hours ago

Counterpoint to this poosey comment: ignore the above misrepresenter.

I got all 21 to scan: iOS 18, 3 - 4 inches from retina display. All scanned within 1 second. Definitely recommend this!!!

Wow this style looks so cool!

notpushkin

5 hours ago

Ah, yes. The classic “works on my device” argument.

Edit: from testing with zbarimg on my laptop: Basic, Camo, Neon (inverted), Glass, Blocks, Alien all seem to work reliably. Not sure what the problem is with some others, but maybe they’ll also work with some tweaking (Mondrian seems simple enough! maybe contrast issues?)

  wl-paste -t image/png | zbarimg -
  # macOS:
  pngpaste | zbarimg -
Edit 2: for codes that will definitely be scanned using a camera [1], some styles can work because phone camera isn’t perfect. E.g. if you slightly blur Dots, it works with zbarimg, which also means it would work if you slightly move around your phone.

[1]: Screenshots are used sometimes! E.g. for importing TOTP codes into a password manager, etc.

keepamovin

5 hours ago

Precisely the OP.

More importantly it's sad and bad when a obvious negative comment is at the top of a front-page Show HN, that misrepresents and then deigns to provide recommendations against this nascent beautiful project that needs our support. Effectively shutting down the experience and enjoyment for incoming audience, and for the creator.

That is a very bad thing and should not be tolerated. Speak up against it.

notpushkin

4 hours ago

OP is being respectful and merely points out an issue: the codes generated don’t work with some devices. If you want a code that works with everything, you can’t do too much customization.

It’s a very okay thing to point out and there isn’t much negativity in it. I agree that we should support projects like this, but being dismissive of real issues is not the way.

keepamovin

an hour ago

No; top comment: "don't use it" because "I tested on <my setup>" and <it failed> - you don't see the problem?

It is OK to point out, but not to dissuade others from using, you see? Especially on a Show HN for a cool project where some good person has clearly poured their passion into it. You got to stand up for that stuff. Bring the positivity, man! Frame real issues in the correct (qualified and personal) light, not proclaiming a blanket recommendation, way to go.

I get how making such quick generalizations can serve you well as an engineer, but when people's work is involved it pays to think about it a bit more! :)

Example of respectful: I tried this, super cool, and I encourage everyone to give it a try. For my setup (details), I could only get 10 to work <more details if you want>, but that might just be me. All around super awesome project, love it!"

Example of truly awesome comment if you want to be a super star: I tried this, super cool, and I encourage everyone to give it a try. For my setup (details), I could only get 10 to work <more details if you want>, but that's probably just me! edit: Thinking about it some more, I realized it might be because my device uses an outdated lib<something> and I just updated that and I got 19 of them to work! I checked <the qr code scanning app>'s GitHub and saw they also hadn't updated this dependency. So I opened an issue, and let them know about this, here's the link: <gh issue>. All around super awesome project, love it!"

You get the idea?

Few word mantra: contribute and build, not deplete and discourage.

stkdump

4 hours ago

I tested it with my phone and got similar results: I got only 9 out of the 21 QR codes to work. I don't know why you think such a finding should not be mentioned here.

keepamovin

an hour ago

I think it should be mentioned but without the "so I'd recommend against using", because that's wrong. Also, specify OS, surface, time, etc for better test!

echoangle

2 hours ago

If you want to use something for production, you shouldn’t only test on the latest stuff you personally have at home but on the crappiest stuff you reasonably expect users to have. Otherwise, you get websites that lag and spin up the fans on everybody’s laptops while the developer is happy on his workstation with 32 cores and a gaming GPU.

keepamovin

an hour ago

Agree, but OP should not then "not recommend" and it shouldn't be top comment dissuading others from seeing this AWESOME project.

echoangle

30 minutes ago

OP didn’t „not recommend“ the project but said

> so I'd recommend against using anything too fancy for real world barcodes.

That’s completely correct and doesn’t speak against the whole project but only against the „too fancy“ styles offered.

codepeddler

5 hours ago

Interestingly enough, it didn't work well with my android. Only couple of them were scanned easily.

keepamovin

40 minutes ago

Provide specs for extra utility (OS, app/camera, distance, surface) :)

OhMeadhbh

4 hours ago

hmm. i can't scan most of these QR codes (i got about 2 of them to scan.) so while i applaud the creative impulse (some of them look REALLY cool), i recommend people use QR codes that are easily scanned.

leesalminen

11 hours ago

Wow, super cool! I love the unique styling. Haven’t seen that before.

I (well, GPT-4) built freeqrgenerator.app specifically for my wife because she kept using the malicious sites that inject a redirect that inevitably die and stop working.

Thinking I can retire mine and use yours instead on the domain.

zhengkyl

10 hours ago

Yeah, there are a lot of annoying sites like that. Your site is cool, it's streamlined and has a easy to remember name and you made it (with a little help) which is great.

It's hard to find, but here are two other generator sites that are free and nice to use.

https://qr.grid.ws/ only has a text box and a download button

https://qrcode.antfu.me/ has a lot of options

dylan604

11 hours ago

These are probably some of the more interesting looks I've seen. My poor phone looked like it was having a conniption fit trying to lock onto just one.

vishnugupta

3 hours ago

The designs are cool enough that they could be printed on physical wall tiles, maybe as easter eggs or otherwise.

keepamovin

38 minutes ago

They should be! These would go well in all kinds of interior places, and would not be out of place on expensive high-end art / photography books and periodicals.

kristopolous

10 hours ago

I should look more into the half-tone. I'm assuming it works off of the error tolerance margins but I actually have no idea.

gus_massa

9 hours ago

That's the cat! The other examples are nice, but the cat is amazing!

cipherzero

8 hours ago

This is awesome. Does anyone know if there is a library for the amazing optical codes that apple uses in its device transfer? I know they have a custom patent for it so I don't know if its something anyone has tried to recreated...

ustad

4 hours ago

Do you have link for more info on optical codes?

zhengkyl

11 hours ago

Did anyone else just watch the Veritasium video

andrei-akopian

10 hours ago

I always notice these patterns on HN.

Always gives me dejavu and that feeling you get when you suddenly start encountering some new topic or word in suspiciously large amounts.

Some big sciency/techy outlet puts something interesting out, and suddenly related topics start popping up everywhere else. I am guilty of a few of these myself.

jillesvangurp

6 hours ago

I did not. But now I have. And thank you for that.

Also, this library is amazing. I might use it.

kdjdjdndnd

4 hours ago

While those look cool, most do not work at all on my phone

keepamovin

37 minutes ago

Provide more details (OS, camera/app, distance, surface type), please! :)