Code Monkey home page Code Monkey logo

rmqrcode-python's People

Contributors

ar-ray-code avatar kianmeng avatar kikuchan avatar oudon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rmqrcode-python's Issues

Incorrect optimization

Bug in the SegmentOptimizer.

Summary

A cost computed by SegmentOptimizer is too small in Byte Mode. This bug causes invalid segmentation.

Current Behaviour

>>> qr._optimized_segments("点茗")
[{'data': '点茗', 'encoder_class': <class 'rmqrcode.encoder.byte_encoder.ByteEncoder'>}

Expected Behaviour

>>> qr._optimized_segments("点茗")
[{'data': '点茗', 'encoder_class': <class 'rmqrcode.encoder.byte_encoder.KanjiEncoder'>}

The rMQR class should have quiet zone

Summary

Make the rMQR class have the quiet zone.

Background

The rMQR code is surrounded by 2X light modules called quiet zone. This is defined in the ISO/IEC 23941 6.3.10 Quiet zone. However, currently implementation of the rMQR class has no quiet zone. When we generate an image file, QRImage class adds the quiet zone. If clients use the rMQR class directly, they should add the quiet zone in client-side.

Suggestion

Make the rMQR class have the quiet zone.

unknown file extension: .png

with space:

C:\Users\SYM\Pictures>rmqr 'github.com/PixelSymbols' 'github profile.png'
usage: rmqr [-h] [--ecc {M,H}] [--version VERSION] [--fit-strategy {min_width,min_height,balanced}] DATA OUTPUT
rmqr: error: unrecognized arguments: profile.png'

Without space

C:\Users\SYM\Pictures>rmqr 'github.com/PixelSymbols' 'github_profile.png'
Traceback (most recent call last):
  File "C:\Users\SYM\AppData\Local\Programs\Python\Python312\Lib\site-packages\PIL\Image.py", line 2415, in save
    format = EXTENSION[ext]
             ~~~~~~~~~^^^^^
KeyError: ".png'"

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\SYM\AppData\Local\Programs\Python\Python312\Scripts\rmqr.exe\__main__.py", line 7, in <module>
  File "C:\Users\SYM\AppData\Local\Programs\Python\Python312\Lib\site-packages\rmqrcode\console.py", line 61, in main
    _save_image(qr, args.OUTPUT)
  File "C:\Users\SYM\AppData\Local\Programs\Python\Python312\Lib\site-packages\rmqrcode\console.py", line 36, in _save_image
    image.save(output)
  File "C:\Users\SYM\AppData\Local\Programs\Python\Python312\Lib\site-packages\rmqrcode\qr_image.py", line 24, in save
    self._img.save(name)
  File "C:\Users\SYM\AppData\Local\Programs\Python\Python312\Lib\site-packages\PIL\Image.py", line 2418, in save
    raise ValueError(msg) from e
ValueError: unknown file extension: .png'

Some versions code are can't be recognized by QRQR

The codes that generated this library with version R7x77, R7x139, R9x59, R9x99, R11x43, R11x77, R11x139, R13x27, R15x99, R15x139 are could not be recognized with QRQR.

to Reproduce

  1. $ rmqr nasubi out.png --version R7x77
  2. scan out.png with QRQR

Version

  • rmqrcode: 0.3.1
  • QRQR for iOS: 3.0.29

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.