How to create a QR Code Version 14 (73x73modules)

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How to create a QR Code Version 14 (73x73modules)

Clarence Martin via use-livecode
Hi.

My app needs to create qr codes. This is not a problem so far, as Splash21´s  qrCode library is now included in Livecode.

My problem is that i need to create qr Codes with exact version 14, which has a matrix size of 73 x 73. The customer needs exact that kind of code. The codes are scanned by a parcel service and the tech papers of the parcel service note exact those requirements.

As the  qrCode library in LC automatically decides according to the number and types of the characters, what version is used for creation, i am not sure if this is even possible. But is there a way to create just version 14 codes regardless of the number of character? Maybe with a modified library?

Regards,

Matthias


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: How to create a QR Code Version 14 (73x73modules)

Clarence Martin via use-livecode
Hi Matthias

This looks like a relatively easy patch to make. Probably adding min version and max version optional parameters which default to 1 and 40 then using those in the loop to find the min version at line 1525 of the script. Then you just use 14,14 for the parameters.

It would be great if you would open an enhancement report and if so inclined contribute the patch in case others hit the same requirement.

Cheers

Monte

> On 18 Jul 2018, at 8:20 am, Matthias Rebbe via use-livecode <[hidden email]> wrote:
>
> Hi.
>
> My app needs to create qr codes. This is not a problem so far, as Splash21´s  qrCode library is now included in Livecode.
>
> My problem is that i need to create qr Codes with exact version 14, which has a matrix size of 73 x 73. The customer needs exact that kind of code. The codes are scanned by a parcel service and the tech papers of the parcel service note exact those requirements.
>
> As the  qrCode library in LC automatically decides according to the number and types of the characters, what version is used for creation, i am not sure if this is even possible. But is there a way to create just version 14 codes regardless of the number of character? Maybe with a modified library?
>
> Regards,
>
> Matthias
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: How to create a QR Code Version 14 (73x73modules)

Clarence Martin via use-livecode
Monte,

you are my hero. :)

I´ve changed line 1486 to
command qrCreate pImg, pData, pECC, pSize, pMask, pMinVersion, pMaxVersion

and changed the line 1525  from
repeat with tVersion = 1 to 40
to
 if pMinVersion is empty then put 1 into pMinVersion
 if pMaxVersion is empty then put 40 into pMaxVersion
 repeat with tVersion = pMinVersion to pMaxVersion

It´s working! ! !

I will open an enhancement report tomorrow afternoon and will add my patch after i´ve added some additional code for error handling in case pMinVersion is greater than pMaxVersion or if pMaxVersion >40 and so on.

Thank you very much.

Matthias


> Am 18.07.2018 um 01:29 schrieb Monte Goulding via use-livecode <[hidden email]>:
>
> Hi Matthias
>
> This looks like a relatively easy patch to make. Probably adding min version and max version optional parameters which default to 1 and 40 then using those in the loop to find the min version at line 1525 of the script. Then you just use 14,14 for the parameters.
>
> It would be great if you would open an enhancement report and if so inclined contribute the patch in case others hit the same requirement.
>
> Cheers
>
> Monte
>
>> On 18 Jul 2018, at 8:20 am, Matthias Rebbe via use-livecode <[hidden email]> wrote:
>>
>> Hi.
>>
>> My app needs to create qr codes. This is not a problem so far, as Splash21´s  qrCode library is now included in Livecode.
>>
>> My problem is that i need to create qr Codes with exact version 14, which has a matrix size of 73 x 73. The customer needs exact that kind of code. The codes are scanned by a parcel service and the tech papers of the parcel service note exact those requirements.
>>
>> As the  qrCode library in LC automatically decides according to the number and types of the characters, what version is used for creation, i am not sure if this is even possible. But is there a way to create just version 14 codes regardless of the number of character? Maybe with a modified library?
>>
>> Regards,
>>
>> Matthias
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: How to create a QR Code Version 14 (73x73modules)

Clarence Martin via use-livecode
He's my hero too. He just fixed a JSON crasher that only happened on
Android 6.x. Clever.

--
Jacqueline Landman Gay | [hidden email]
HyperActive Software | http://www.hyperactivesw.com
On July 17, 2018 7:15:04 PM Matthias Rebbe via use-livecode
<[hidden email]> wrote:

> Monte,
>
> you are my hero. :)




_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: How to create a QR Code Version 14 (73x73modules)

Clarence Martin via use-livecode
In reply to this post by Clarence Martin via use-livecode
I´ve filed an enhancement request now <https://quality.livecode.com/show_bug.cgi?id=21428> and attached the patched library file and an updated api.lcdoc  with 2 additional examples to the request.


Matthias




> Am 18.07.2018 um 02:13 schrieb Matthias Rebbe via use-livecode <[hidden email]>:
>
> Monte,
>
> you are my hero. :)
>
> I´ve changed line 1486 to
> command qrCreate pImg, pData, pECC, pSize, pMask, pMinVersion, pMaxVersion
>
> and changed the line 1525  from
> repeat with tVersion = 1 to 40
> to
> if pMinVersion is empty then put 1 into pMinVersion
> if pMaxVersion is empty then put 40 into pMaxVersion
> repeat with tVersion = pMinVersion to pMaxVersion
>
> It´s working! ! !
>
> I will open an enhancement report tomorrow afternoon and will add my patch after i´ve added some additional code for error handling in case pMinVersion is greater than pMaxVersion or if pMaxVersion >40 and so on.
>
> Thank you very much.
>
> Matthias
>
>
>> Am 18.07.2018 um 01:29 schrieb Monte Goulding via use-livecode <[hidden email]>:
>>
>> Hi Matthias
>>
>> This looks like a relatively easy patch to make. Probably adding min version and max version optional parameters which default to 1 and 40 then using those in the loop to find the min version at line 1525 of the script. Then you just use 14,14 for the parameters.
>>
>> It would be great if you would open an enhancement report and if so inclined contribute the patch in case others hit the same requirement.
>>
>> Cheers
>>
>> Monte
>>
>>> On 18 Jul 2018, at 8:20 am, Matthias Rebbe via use-livecode <[hidden email]> wrote:
>>>
>>> Hi.
>>>
>>> My app needs to create qr codes. This is not a problem so far, as Splash21´s  qrCode library is now included in Livecode.
>>>
>>> My problem is that i need to create qr Codes with exact version 14, which has a matrix size of 73 x 73. The customer needs exact that kind of code. The codes are scanned by a parcel service and the tech papers of the parcel service note exact those requirements.
>>>
>>> As the  qrCode library in LC automatically decides according to the number and types of the characters, what version is used for creation, i am not sure if this is even possible. But is there a way to create just version 14 codes regardless of the number of character? Maybe with a modified library?
>>>
>>> Regards,
>>>
>>> Matthias
>>>
>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email]
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: How to create a QR Code Version 14 (73x73modules)

Clarence Martin via use-livecode
In reply to this post by Clarence Martin via use-livecode
And the Brits thought THEY were the clever ones!

Bob S


> On Jul 17, 2018, at 17:47 , J. Landman Gay via use-livecode <[hidden email]> wrote:
>
> He's my hero too. He just fixed a JSON crasher that only happened on Android 6.x. Clever.
>
> --
> Jacqueline Landman Gay | [hidden email]
> HyperActive Software | http://www.hyperactivesw.com


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode