iOS Question B4I Physical Screen Size

fbritop

Active Member
Licensed User
Longtime User
Is there any similar code like

Which I used for B4A, but I need it for B4I.

Came across some old code, but the size is not real at all.

I'm in the need of this, as I need to generate a QR code with exact dimensions and position over the screen.
Thanks
FBP
 

emexes

Expert
Licensed User
Physical size in cm/mm/inches, or physical size as in actual number of display pixels across and down?

On the bright side, I think square pixels are normal nowadays

(although I'm off now to gsmarena to check that out, and there's a good chance I'm in for some disappointment...)

Grok points out that e-book readers and e-ink displays often have higher resolution horizontally = don't stake your life on pixels being square.

But if it's not life-and-death, then... how un-square could they reasonably be?
 
Last edited:
Upvote 0

emexes

Expert
Licensed User
Realised we're only talking iOS devices. This specs listed at this website:

https://www.ios-resolution.com

indicate that the most unsquare non-watch devices are early iPhones up to 4S which are < 1.2% out-of-square and then everything since then is < 0.8% out-of-square (median being 0.13% out-of-square). And that's without accounting for rounding of published specs, eg iPhone XR spec is 6.06" but calculated from pixels and DIP is 6.055".
 
Upvote 0

fbritop

Active Member
Licensed User
Longtime User
Physical size in cm/mm/inches, or physical size as in actual number of display pixels across and down?

On the bright side, I think square pixels are normal nowadays

(although I'm off now to gsmarena to check that out, and there's a good chance I'm in for some disappointment...)

Grok points out that e-book readers and e-ink displays often have higher resolution horizontally = don't stake your life on pixels being square.

But if it's not life-and-death, then... how un-square could they reasonably be?
Physical size is always related to a measure (cm, meters, foot, etc). Physical resolution or density is how yo refer to numbers of pixels or any other density measure.

I´m looking (as stated on the title) to the Physical Size

Thanks
 
Upvote 0

emexes

Expert
Licensed User
I´m looking (as stated on the title) to the Physical Size

Do your QR codes have to be a precise and specific size? eg 29 x 29 mm

Is there a problem if it is larger than the precise and specific size? assuming that you still have sufficient surrounding quiet guard area around the code

Is there mis-scanning occurring with the QR codes that your app currently displays? a lossless screen capture of an uncooperative QR code would be useful
 
Upvote 0

emexes

Expert
Licensed User
On a semi-related note:

a local department store here has a person at the exit door who scans the QR code on receipts, and it is amazing how good that scanner is.

Or maybe it just beeps anyway regardless of whether it successfully reads the receipt or not, to make us think we're being checked.

Or perhaps it's taking a photo of us rather than scanning the receipt. But they have heaps of cctv, so... why would they need yet another photo?

I'll follow that up next time I'm there.
 
Upvote 0

fbritop

Active Member
Licensed User
Longtime User
It has to be a precise size. Scanning occurs inside a small box for direct sunlight effects. And the focal distance on the scanner does not have much margin
 
Upvote 0

emexes

Expert
Licensed User
I've been thinking about your scanner. I do like your idea of the surrounding box - that sounds like it'll bypass a lot of scanning issues eg ensures the phone is perpendicular to the scanner, a fixed distance away (in focus), oriented approximately correctly, and steady rather than shaking. 🏆 🏆 🏆 🏆

Scanning occurs inside a small box for direct sunlight effects. And the focal distance on the scanner does not have much margin

Focal distance, or field of view? As long as the entire QR code and surrounding quiet guard area is captured by the scanner's camera, the size shouldn't matter too much, as long as the pixels are large enough to be distinct. I saw something about a minimum size of 25 mm square, but in real life I've seen QR codes say 10 mm square, admittedly with fewer blocks (or whatever the QR pixels are called) modules.

I'd expect that the first thing the scanner algorithm would do is locate the three square bullseye alignment markers, from which it can determine the module size and QR code orientation, and regularise the captured image accordingly. It doesn't feel like it would matter if the QR code was 25 or 31 or 37 mm or whatever.



Edit: when AI works, it's great 🍻

1734844605181.png
 
Last edited:
Upvote 0
Top