PHPackages                             szjcomo/drawing - 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. szjcomo/drawing

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

szjcomo/drawing
===============

php方式验证码库

v0.0.4(6y ago)155MITPHPPHP &gt;=5.6.0

Since Oct 30Pushed 6y ago1 watchersCompare

[ Source](https://github.com/szjcomo/drawing)[ Packagist](https://packagist.org/packages/szjcomo/drawing)[ RSS](/packages/szjcomo-drawing/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (5)Used By (0)

drawing
=======

[](#drawing)

php图像绘制功能库

```

//生成验证码
/*验证码配置项：
	'width'=>100,              //宽度
	'height'=>30,              //高度
	'lang'=>'zh',  			   //语言
	'bg_color'=>[255,255,255], //背景颜色
	'text_color'=>[0,0,0], 	   //文字颜色
	'fontSize'=>20,  		   //文字大小
	'angle'=>0, 			   //倾斜度
	'font'=>'en.ttf',  		   //字体
	'text'=>'5 + 6',  		   //需要绘的文字
	'use_curve'=>true,  	   //是否开启混淆线
	'position_x'=>'auto', 	   //开始绘制横向坐标位置 默认自动计算
	'position_y'=>'auto',      //开始绘制纵向坐标位置 默认自动计算
	'quality'=>80 			   //图片保存质量
	'filename'=>'' 			   //图片保存路径 如果不传filename 和 callback都不传 那么返回base64的字符串
	'callback'=>null    	   //如果传入了callback 那么用户自己处理 否则请传入filename自行保存
*/

$imgstr = Drawing::create(['text'=>mt_rand(1,9).' + '.mt_rand(1,9)]);

echo $imgstr.PHP_EOL;

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

Every ~0 days

Total

4

Last Release

2388d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1ef6302d78be1eee555959fb1e9eb43578ad83603c266b0be073ada7fe015528?d=identicon)[szjcomo](/maintainers/szjcomo)

---

Top Contributors

[![szjcomo](https://avatars.githubusercontent.com/u/54160515?v=4)](https://github.com/szjcomo "szjcomo (5 commits)")

### Embed Badge

![Health badge](/badges/szjcomo-drawing/health.svg)

```
[![Health](https://phpackages.com/badges/szjcomo-drawing/health.svg)](https://phpackages.com/packages/szjcomo-drawing)
```

###  Alternatives

[bacon/bacon-string-utils

BaconStringUtils contain utitilies to work with strings.

27646.5k1](/packages/bacon-bacon-string-utils)

PHPackages © 2026

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