Merricx / qrazybox

QR Code Analysis and Recovery Toolkit
https://merricx.github.io/qrazybox/
MIT License
369 stars 43 forks source link

support up to v40 and some UI enhancements + import/export text file #6

Closed wphiphi closed 1 year ago

wphiphi commented 2 years ago

Hi Imam,

Best Wishes

Here is a single PR for : support up to v40 ( based wip work of Denys Vitali #5 ) and fixing strong decoder/RS/recover padding. some UI enhancements ( dynamic resize based on QR size for encode and decode mode ) import/export text file

Best regards

Phi Phi

wphiphi commented 2 years ago

This PR is linked to #2 .

Merricx commented 2 years ago

Such nice works! Let me check it and then I will merge to master.

By the way, any specific reason why you renamed "padding" term into "patching" ? I think padding make more sense because they are literally padding bits

wphiphi commented 2 years ago

Imam, I renamed because in branch step-by-step , it is reused to show all change after "patching" . in that branch, there is a dedicated button for comparing (against an existing saved QR) , after RS decoder ( a restore button is added , so you can get the original QR back ), and of course when you patch each segment you can also see where on the QR it changed.

Step-by-step branch did a refactoring , I combined all decoding related activity into one function instead of having that same thing redone for RS , Padding , Strong Decoder and ReadDatabits.

Also Kanji decoding works in Strong Decoder ( but not on the normal decode section ).

I am still Work-in-progress on that branch . Segment patching don't have the apply button commited yet.

Darkar25 commented 2 years ago

I was going through qrazybox help page and saw this image...would be cool if highlighting was like this in the editor too, and not only red color for non-editable pixels...i suggest making this)) QRCode-2-Structure

wphiphi commented 2 years ago

@Darkar25 well version is already colored red (if QR size is version 7 or higher ) and not editable and it is filled for you based on selected new size or recognised size , format is only editable when clicking on the QR format info location. for educational purpose , it would be great to separate highlight . What I found more useful because I got some great difficulty to resolve a v12 QR ( 65x65) would be to color datablock due to interleaving and ECC ( global or per datablock ) , you can apply erasure ( grey color) properly visually to the correct datablock . There four such a datablock and they are interleaved so it is really hard.

wphiphi commented 2 years ago

Hi Darkar25, it is directly taken from Waidotto ( https://github.com/waidotto/strong-qr-decoder ) Readme.md

使い方 QRコードをテキストデータで流し込みます。

'X', 'x', 'O', 'o', '#', '1'は暗モジュールとして扱われます。
'_', '-', ' ', '0'は明モジュールとして扱われます。
'?'は明暗が不明であるモジュールとして扱われます(マスク解除後に明モジュール扱いになります)

Which translate to :

How to use Insert the QR code as text data.

 'X',' x',' O',' o',' #', '1' are treated as dark modules.
 '_','-','', '0' are treated as bright modules.
 '?' Is treated as a module whose light and darkness is unknown (it will be treated as a light module after unmasking). 

:)

Darkar25 commented 2 years ago

oh...ok)

wphiphi commented 2 years ago

@Darkar25 It is from the Japanese Culture for the O and X Notation : O mean yes / true / Correct , X mean no / false / error .