1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

アメージングQR

Posted at

きっかけ

Datamatrix (データマトリックス) を無料で作れるAPIやライブラリないか探していたら、 EFQRコード に出会い、アメージング-QRにインスピレーションを得たと書いてある。じゃあ自分なりのメモを残そうと思った。

会社ロゴとかを中心に置いたQRコードよりインパクトがあっていいなと思った。

Amazing-QR のAPI日本語訳(非公式)

サンプルはここから見れます。

インストール

pip install amzqr

使用方法

ターミナル

amzqr Words
      [-v {1,2,3,...,40}]
      [-l {L,M,Q,H}]
      [-n output-filename]
      [-d output-directory]
      [-p picture_file]
      [-c]
      [-con contrast]
      [-bri brightness]

Words(第一引数)*必須

amzqr https://github.com

カレントディレクトリに qrcode.png が出力され Wordsの部分のデータが書かれたQRコードを得ることができる。

-v オプション (サイズオプション)

amzqr https://github.com -v 10

QRコードの大きさを指定することができる。

最小値 1
最大値 40

-l オプション (誤り訂正レベル)

誤り訂正レベル の指定

  • L 最低レベル(損傷に最も弱い)
  • M
  • Q
  • H 最高レベル(一般的,最も損傷に強い)

-n オプション (出力名オプション)

amzqr https://github.com   -n github_qr.jpg

出力名を変更することができる。

拡張子は、 jpg,.png,bmp,gif のどれかである。

-d オプション (出力ディレクトリオプション)

出力ディレクトリを変更することができる。

amzqr https://github.com   -n github_qr.jpg   -d .../paths/

-p オプション (画像埋め込みオプション)

amzqr https://github.com -p github.jpg

カレントディレクトリ の画像を読み込み QRコード結合する。

-c を付けない限り白黒出力となる。

アニメーション

アニメーション付きのQRコードにするためには、 .gif で画像を入力し -n オプションを付けて .gif で出力しなければならない。

私の経験としては、 PNG画像はあまり使わないほうが良い。理由として背景透過があると、それが台無しになる。背景透過が無ければPNGでもよいと思う。

-c オプション (画像カラー化オプション)

-p スイッチ の結果をカラーにする。

-con オプション (コントラストオプション)

画像のコントラストを変更する。低い数値は低コントラストに対応し、高い数値は高コントラストに対応する。

デフォルト値: 1.0

-bri オプション (輝度オプション)

画像の輝度を変更する。
デフォルト値:1.0

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?