Yeah, the QR format is actually pretty difficult for something like Daffodil to
model.
As Larry points out, first you would need to convert the image into a 2-d matrix
of bits (black is 1, white is 0), which is probably not something DFDL can
handle. Maybe for a simple format like BMP it's doable, but anything more
complex (jpeg, png, etc.) would probably be pretty difficult.
Making it more complicated, the order you need to read the 2-d matrix of bits
doesn't match the order DFDL would see the bits. QR codes read bits in a up and
down winding path--DFDL can't really read bits in an arbitrary order like that.
It can only really read them in the order they appear in the data, which for
something like BMP I think is left to right, top to bottom.
If you had something else do the image to 2-d bit matrix conversion and then
reorder the bits following the path, then DFDL could probably decode that
result. But that's not really the interesting part of QR codes. And even if you
did that, DFDL probably couldn't support the error correct aspect either, so
you're missing a major feature of QR as well.
There's a number of formats that just aren't suited well for DFDL, QR codes are
probably one of them.
On 2024-10-28 11:01 AM, Larry Barber wrote:
They are image files.
Probably no way for Daffodil to decode the data -- which includes significant
redundancy.
-----Original Message-----
From: Roger L Costello <coste...@mitre.org>
Sent: Monday, October 28, 2024 10:51 AM
To: users@daffodil.apache.org
Subject: DFDL description of QR codes?
I think it would be wicked cool to create a DFDL description of QR codes.
Question: Is a QR code a binary file, or is it an image (JPEG, GIF, PNG, etc.)?