cleverweb-cz/text-3d-captcha
最新稳定版本:v1.0.1
Composer 安装命令:
composer require cleverweb-cz/text-3d-captcha
包简介
Simple axonometric 3D text CAPTCHA
README 文档
README
Simple axonometric 3D text CAPTCHA
- Creates an axonometric letter projection that is difficult to read for OCR, but easy for humans.
- Uses the built-in bitmap fonts of the PHP GD library to create the source height-map array.
- Random noise is applied to the source map so that the result is not deterministic.
- The output is raster PNG or vector SVG.
Prerequisites
- PHP 8.0+
- GD library
Installation
The preferred way to install this library is by using Composer:
composer require cleverweb-cz/text-3d-captcha
Usage
Basic
$map = new GdFont('ABCD 123'); $image = new Svg(new Axonometry($map)); header('Content-Type: '.Svg::getMimeType()); $image->save(); // Output to browser
Custom
/** * noise = 0 * padding = 0.2 (20%) * emboss height volume = 0.7 (70%) */ $map = new GdFont('ABCD 123', 0, .2, .7); /** * Projection scale = 6x * Projection angle = 1.57 rad (90 deg) * Foreground color = red * Background color = gray */ $image = new Png(new Axonometry($map, 6., 1.57), 0xff0000, 0xcccccc); header('Content-Type: '.Png::getMimeType()); $image->save(); // Output to browser
Also check the examples in the /example directory.
统计信息
- 总下载量: 250
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-02-03