PHPackages                             tekintian/php\_qrcode\_tiny - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tekintian/php\_qrcode\_tiny

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tekintian/php\_qrcode\_tiny
===========================

PHP qrcode 二维码工具类 精简版本

1.0(7y ago)1128BSD-3-ClausePHPPHP ^5.3|^7.0

Since Apr 5Pushed 7y ago1 watchersCompare

[ Source](https://github.com/tekintian/php_qrcode_tiny)[ Packagist](https://packagist.org/packages/tekintian/php_qrcode_tiny)[ Docs](https://github.com/tekintian/php_qrcode_tiny)[ RSS](/packages/tekintian-php-qrcode-tiny/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

php qrcode tiny 二维码生成精简版
========================

[](#php-qrcode-tiny-二维码生成精简版)

php生成带LOGO的二维码图片,支持png, jpg格式, 单文件轻巧版!

使用方法
----

[](#使用方法)

```
# 切换至项目根目录后执行以下命令安装本工具
composer require "tekintian/php_qrcode_tiny"
```

生成二维码
-----

[](#生成二维码)

```
# autoload.php自动载入
require_once __DIR__ . 'vendor/autoload.php';

$qr_data = 'http://dev.yunnan.ws'; //二维码数据
$qr_name = 'myqr.png';
$qr_error_correction_level = 'L'; //纠错级别：L、M、Q、H
$qr_matrix_point_size = 10; //二维码矩阵点大小，单位：点， 1到10 数值越大生成的图片就越大

# 使用方法一
\tekintian\QRcodeTiny::png($qr_data, $qr_name, $qr_error_correction_level, $qr_matrix_point_size, 2);

# 使用方法二
\tekintian\qrcode_tiny\Qrcode::png($qr_data, $qr_name, $qr_error_correction_level, $qr_matrix_point_size, 2);
```

```
# 生成带LOGO的二维码图片demo
# autoload.php自动载入
require_once __DIR__ . 'vendor/autoload.php';

$data = 'http://dev.yunnan.ws'; //二维码数据
$qr_error_correction_level = 'L'; //纠错级别：L、M、Q、H
$qr_matrix_point_size = 10; //二维码图片的大小，单位：点， 1到10
\tekintian\qrcode_tiny\Qrcode::png($data, 'myqr.png', $qr_error_correction_level, $qr_matrix_point_size, 2); //不带Logo二维码的文件名
//echo "二维码已生成" . "";
$logo = 'logo.png'; //需要显示在二维码中的Logo图像
$QR = 'myqr.png';
if ($logo !== false) {
	$QR = imagecreatefromstring(file_get_contents($QR));
	$logo = imagecreatefromstring(file_get_contents($logo));
	$QR_width = imagesx($QR);
	$QR_height = imagesy($QR);
	$logo_width = imagesx($logo);
	$logo_height = imagesy($logo);
	$logo_qr_width = $QR_width / 5;
	$scale = $logo_width / $logo_qr_width;
	$logo_qr_height = $logo_height / $scale;
	$from_width = ($QR_width - $logo_qr_width) / 2;
	imagecopyresampled($QR, $logo, $from_width, $from_width, 0, 0, $logo_qr_width, $logo_qr_height, $logo_width, $logo_height);
}
//imagepng ( $QR, 'qr/qr.png' );//带Logo二维码的文件名

// 输出图像到浏览器
header('Content-Type: image/png');
imagepng ( $QR, 'qr/qr.png' ); //输出带Logo二维码图片到浏览器, More: https://www.php.net/manual/zh/function.imagepng.php

exit();
//qr end
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2601d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/798ee906929abfb6fc44fb15400d7f0058dc60ed0b14367a331250f980075da3?d=identicon)[tekintian](/maintainers/tekintian)

---

Top Contributors

[![tekintian](https://avatars.githubusercontent.com/u/10243043?v=4)](https://github.com/tekintian "tekintian (10 commits)")

---

Tags

phpqrcodephpqrcodetiny qrcode

### Embed Badge

![Health badge](/badges/tekintian-php-qrcode-tiny/health.svg)

```
[![Health](https://phpackages.com/badges/tekintian-php-qrcode-tiny/health.svg)](https://phpackages.com/packages/tekintian-php-qrcode-tiny)
```

###  Alternatives

[endroid/qr-code

Endroid QR Code

4.8k67.6M348](/packages/endroid-qr-code)[chillerlan/php-qrcode

A QR Code generator and reader with a user-friendly API. PHP 8.4+

2.4k28.9M208](/packages/chillerlan-php-qrcode)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
